cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <tcu...@dff.st>
Subject position()
Date Tue, 25 Jul 2000 09:39:49 GMT
<root>
  <text>bla</text>
  <image/>
  <image/>
</root>

I need the position of the "image" tag
within "root".

<xsl:template match="image">
  <xsl:number value="position()"/>
</xsl:template>

Gives me "bla 4 6"

Question #1:
  Why is it 4 and 6 and not 3 and 4? Or does position()
  include the closing tags?

Question #2:
  I need "bla 1 2" because I need the position relative
  to the first image tag! What's the syntax for that?

Thanx
--
Torsten

Mime
View raw message