|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: an Xpath question - $tag/$subtag
> At 2003-07-07 14:10 -0400, Anil wrote: > > here is my problem..i have to use 2 variables to reach a > tag in my > >xml, i tried using > > > > <xsl:apply-templates select="$tag/$subtag"> > Guessing from the names of the variables, I suspect that $tag and $subtag are variables containing element names as strings, in which case the answer is select="*[name()=$tag]/*[name()=$subtag] (assuming there are no namespace complications). Note, as we often tell people on this list, variables are not macros. They represent values, not parts of an XPath expression. You can only use them in places where you could use a value, or an expression such as a function call. Michael Kay 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








