|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Using name in Xpath
Am I using name() incorrectly in the following xpath?
We are developing a Microsoft .Net application and the
processor is telling me it is an invalid xpath. Unfortunately,
I don't have much experience with their processor.
With a bunch of the non-relevant xsl taken out, this is what
I've got:
<xsl:variable name="emailData" select="document('emailData.xml')"/>
<xsl:template match="notification">
<xsl:variable name="pSite" select="site"/>
<SITE><xsl:value-of select="$pSite" /></SITE>
<REPLY_TO><xsl:value-of
select="$emailData/data/[name()=$pSite]/reply_to" />
</REPLY_TO>
Testing shows that the variable $pSite does get the expected value.
The emailData.xml file might look like:
<data>
<Location1>
<reply_to>support@xxxxxxxxxxxxx</reply_to>
</Location1>
<Location2>
<reply_to>support@xxxxxxxxxxxxx</reply_to>
</Location2>
</data>
Thanks for any help you can provide
Alan Harbaugh
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








