[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xpath and variables

Subject: RE: xpath and variables
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 10 Jun 2003 18:25:31 +0100
mike selvi
You can't construct dynamic XPath expressions in standard XSLT.

Your options are:

(a) construct the stylesheet dynamically
(b) use the xx:evaluate() extension available in some products (e.g.
Saxon, Xalan)

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Selvi Chennai
> Sent: 10 June 2003 17:30
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  xpath and variables
> 
> 
> Hi All,
>  
> Help , help.
>  
> I'm working on a XSL doc 
> 1) which scans XML-Doc1 to construct an Xpath --
> assigns to a variable
> 2) Gets the data from XML-Doc2 based on the generated
> xpath.
>  
> Now in my XSL I need to use 
>  
> <xsl:value-of select $var1/$var2 />
>  
> example:
>  
> <xsl:variable name="docdataXML"
> select="document('foo.xml')/>
> <xsl:variable name="path" select="//level1/level2" />
> -- Note that this is dynamically created. I've hard
> coded for example
>  
> <xsl:value-of select="$docdataXML/$path"/>
>  
> $docdataXMl was evaluated to a nodelist. But $path
> does not seem to act on it.
>  
> Any suggestion on how to get this working is
> appreciated.
>  
> Thanks
>  
>  
> Selvi.
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to 
> Outlook(TM). http://calendar.yahoo.com
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.