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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL variables

Status
Not open for further replies.

nigele2

Programmer
Oct 8, 2001
17
0
0
GB
My XML looks like:

<e2contacts ......>
<company Prospect=&quot;0&quot; Formerclient=&quot;0&quot; Supplier=&quot;0&quot; PublicSector=&quot;0&quot; ITIndustry=&quot;0&quot;>
<conumber>10920</conumber>
.........
<contacts addrnumber=&quot;1&quot; contactnumber=&quot;1&quot; X=&quot;1&quot; Technical=&quot;0&quot; Oracle=&quot;0&quot; User=&quot;0&quot; Seniormanagement=&quot;0&quot; golf=&quot;0&quot;>
<surname>Hiscoe</surname>
.......

<note>null</note>
</contacts>

I want to output (among other things)

for each person: addrno, contactno, a link passing both values as parameters.

My XSL is:

<xsl:for-each select=&quot;@addrnumber&quot;> <xsl:value-of select=&quot;.&quot;/> </xsl:for-each>
<xsl:for-each select=&quot;@contactno&quot;> <xsl:value-of select=&quot;.&quot;/> </xsl:for-each>

now output link

If I use variables within the for loops they are out of scope by the time I want to construct the link.

Do I need to use parameters or can I create the variables at a higher level? I have read the bumf but remain baffled. Have I missed something basic?

Any help much appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top