Subject: Re: [xsl] Capturing position as a number From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Wed, 18 Mar 2009 19:24:12 +0100 |
I need to capture an elements position as an integer to a variable so I can use that number in capture the text from another element that shares the same position number in another part of the tree.
My XML looks something like this:
<Document>
<CONDITION>
<HYPERPROC linkend="M16-66A.-HP1">Webbing straps removed</HYPERPROC>
</CONDITION>
<CONDITION>
<HYPERPROC linkend="M16-66A.-HP2">Remote Terminal Unit Removed</HYPERPROC></CONDITION>
</Document>
My template:
<xsl:template match="CONDITION">
<xsl:variable name="CurrentCond"><xsl:value-of select="CONDITION[position()]"/></xsl:variable>
Martin Honnen http://JavaScript.FAQTs.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Capturing position as a n, Geert Josten | Thread | [xsl] Convet SGML data to XML forma, Happy Name |
RE: [xsl] Capturing position as a n, Geert Josten | Date | [xsl] Convet SGML data to XML forma, Happy Name |
Month |