xsl-list
[Top] [All Lists]

for-each does not iterate

2004-12-09 10:28:25
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[(_at_)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.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>