[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] for-each does not iterate
When I apply the following template to my document which hold two <a> tags I only get output for 1. The funny thing is that the count function finds 2 occurences but for-each doesn iterate right. Input: ------ ... <relation name="relatedImage" type="image" multi="yes"> <td> <a href="aktive_flags.jpg">aktive Flags (konzernweite Einwilligungsklausel</a> <br /> <a href="inaktive_flags.jpg">inaktives Flag (Einwilligungsklausel alt)</a></td> </relation> ... XSL: ---- ... <xsl:template match="relation[@type = 'image']" priority="1"> <xsl:copy> <cnt><xsl:value-of select="count(.//a)"/></cnt> <xsl:foreach select=".//a"> <iterator/> </xsl:foreach> </xsl:copy> </xsl:template> ... Output: ------- ... <relation> <cnt>2</cnt> <iterator /> </relation> ... Can you help? Thanks. R.
|
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
|