Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSLT - Refer to nodes outside current node

Status
Not open for further replies.

JeepStone

Technical User
Mar 11, 2002
9
GB
I have the following XML:

<skills>
<level1 skillid=&quot;1&quot;>
<level2 skillid=&quot;20&quot;>
...
</skills>
<selected>
<row number=1>
<level1>1</level1>
<level2>30</level2>
...
</row>
</selected>

I'm using an apply templates for each <row> which creates a series of dropdowns for each skill level. The <selected> nodes indicate which, if any, dropdowns have been previously selected but is out of scope.

I'm using a test statement to compare the in-context skillid with the relevant value in <row> and appending SELECTED but it only takes the last <row>.

How do I refer to the node out of context but still relatively? I was thinking of variables but they would surely still be out of context?

Thanks in advance JeepStone
 
call a named template using a parameter to pass your context-node?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top