|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: getting the node position in source xml in a varia
Hi Gurvinder,
I'm afraid that I can't tell what's going wrong without you supplying
some more information, specifically about how you're calling the
template. I tried using this source XML:
<test>
<datanodes>
<data>3</data>
<data>2</data>
<data>1</data>
</datanodes>
<displaynodes>
<display>C</display>
<display>B</display>
<display>A</display>
</displaynodes>
</test>
With this call to the template:
<xsl:call-template name="lookup">
<xsl:with-param name="name" select="'test'" />
<xsl:with-param name="datanodes"
select="/test/datanodes/data" />
<xsl:with-param name="displaynodes"
select="/test/displaynodes/display" />
</xsl:call-template>
And I got this result:
<select name="test">
<option id="1" value="1">1-A</option>
<option id="2" value="2">2-B</option>
<option id="3" value="3">3-C</option>
</select>
One problem that could be occurring is if the $displaynodes aren't
actually siblings of each other. But without seeing how you're
actually calling the template and what the source of your stylesheet
looks like, I can't tell.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








