[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

for-each does not iterate

Subject: for-each does not iterate
From: "Robert Soesemann" <rsoesemann@xxxxxxxxxxx>
Date: Thu, 9 Dec 2004 18:28:25 +0100
xsl 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.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.