Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] XSL questions

From: David Carlisle <davidc@--------->
To:
Date: 6/1/2006 11:43:00 PM
> I can use another editor to make the change. The problem is the html
> tags don't serve its funcation when a html file is genereated with the
> XSL file.  

> Not a solution?

As I say XSLT doesn't care about validity if you want html elements in
there then it will generate them. The file you showed wasn't HTML
(having Para element etc,so presumably you are extracting the html from
there with another process. If that is breaking the html then you will
need to look at that.

> The id is an attribute of the node looping. I guess I should count the
> node itself. But, the editor doesn't allow me.

Sorry I can't guess what you intend here. count() tells you the number of
nodes in the node set supplied as its argument, if you count a node set
consisting of "the node itself" then you will clearly get the answer 1,
always. Presumably you mean something else?


> That serves the same function. But, it is not what I am asking for. I
> need to find out whether there is an element met the condition after
> the loop. 

You are querying the source document which is unchanging so whether the
elements meet the condition is the same bfore after or during the loop.
<xsl:variable name="x" select=..."/>
<xsl:for-each select="$x">
...
</xsl:for-each>
<xsl:if test="$x[$current_id = @relatedPerson]"> some nodes met the
condition</xsl:if>

David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent