In a template, position() always returns the position of the current node
in the parent, as you've discovered. However, you don't say what sort of
"position" information you're actually interested in. The position
relative to what?
Note that generic XSLT questions are best asked on the Mulberry Technology
list, where there are lots of experts who are very eager to answer such
questions. See:
http://www.mulberrytech.com/xsl/xsl-list
Dave
Vinoth
Palaniappan To:
[email protected]
<[EMAIL PROTECTED] cc: (bcc: David N
Bertoni/Cambridge/IBM)
mot.com> Subject: how to find position?
07/31/2002 12:58
AM
Hi All,
I've a DTD: <!ELEMENT filterable_body_data (nv_pair*)> and the
corresponding xml document is:
<filterable_body_data>
<nv_pair/>
<nv_pair/>
</filterable_body_data>
I've an XSL document for transferring this xml to a C++ header file. The
XSL
file snippet is:
<xsl:template match="filterable_body_data">
fill_filterable_body()
{
<xsl:for-each select="child::*">
<xsl:apply-templates
select="."></xsl:apply-templates>
</xsl:for-each>
}
When I use "position()" inside <xsl:template match="nv_pair">
....</xsl:template > I always get a value one which i think is
corresponding
to it's parent <filterable_body_data>. My doubt is how can i get the
position of nv_pair element inside the XSL snippet <xsl:template
match="nv_pair"> ....</xsl:template > .
thanks for reading through.
____________________________________________________________________________
___________
Vinoth
iDEN OMC Software, GSG
Motorola, India
voice: 91-040-3308090 extn:3208
____________________________________________________________________________
___________