You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Vinoth Palaniappan <vi...@mihy.mot.com> on 2002/07/31 09:58:57 UTC

how to find position?

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
____________________________________________________________________________
___________