Subject: RE: [xsl] Get value outside of for-each Statement From: "Passin, Tom" <tpassin@xxxxxxxxxxxx> Date: Thu, 19 Aug 2004 15:20:10 -0400 |
> From: john lee [mailto:excel_man@xxxxxxxxxxx] > I got a problem with for-each statement. When you are inside a for-each > statement, how do you link the value inside the for-each statement with a > value that is outside of the element being looped through ? > You don't show where the employee number resides, so it is hard to give precise advice or to know if some other way besides for-each would be better (for example, apply-templates might work well, and make for easy access to other data you are interested in. However, generally, you either use a variable or a key to get what you want. Cheers, Tom P > This is the xml: > > <employee_name> > </employee_name> > <employee_number> > </employee_number> > > <employee_name> > </employee_name> > <employee_number> > </employee_number> > > This is the output I want to have: > Employee Name: Test1 Employee Number: 123 > Employee Name: Test2 Employee Number: 456 > > > <xsl:for-each select="employee_name"> > <tr> > <td> Employee Name: <xsl:value-of select="employee_name"></td> > <td>Employee Number: ______________________________ </td> > </tr> > </xsl:for-each> > > Any help would be appreciated > > _________________________________________________________________ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Get value outside of for-, Michael Kay | Thread | RE: [xsl] Get value outside of for-, Passin, Tom |
Re: [xsl] Get value outside of for-, Niclas Hedhman | Date | RE: [xsl] Get value outside of for-, Passin, Tom |
Month |