|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: apply-templates repeats inside xsl:for-each, why
I think I've narrowed it down a bit. This code calls no templates:
<xsl:variable name="num" select="count($platforms/platform)"/> <xsl:for-each select="1 to $num">
<xsl:value-of select="$platforms/platform[position()]/@id"/>
<xsl:text> </xsl:text>
</xsl:for-each>This outputs the following: unique_2 unique_35 unique_37 unique_2 unique_35 unique_37 unique_2 unique_35 unique_37 Why does it repeat this 3 times instead of just once? If I remove one of the nodes in $platforms so there are only 2 nodes, then I get this: unique_2 unique_35 unique_2 unique_35 By the way, the @id's are repeated in the same file, but they are in separate namespaces. It's not a structure of my making, it's a temp file produced by the DITA Open Toolkit, if you happen to be familiar with that. On 6/15/14 6:03 PM, Syd Bauman s.bauman@xxxxxxx wrote: Well, without seeing at least the code that matches <concept> and the portion of the input that has <concept>, it's hard to impossible to say. But my first guess would be that the code that matches <concept id="unique_2"> generates one line of output for each <platform>.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








