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

RE: XPath Expressions inside a variable

Subject: RE: XPath Expressions inside a variable
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Sat, 22 Dec 2001 15:04:21 -0000
xsl variable inside xpath
XSLT doesn't allow expressions to be held in variables.

Some products have an xx:evaluate() extension function that might meet your
needs - assuming there isn't a simpler way.

Mike Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Richard
> Garcia
> Sent: 21 December 2001 22:40
> To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:  XPath Expressions inside a variable
>
>
> I am trying to build following element (which works):
>
> <xsl:for-each select="document('mydoc.xml')/FirstSibling">
> 	<xsl:copy-of select="Row" />
> </xsl:for-each>
>
> I'm trying to parse a information to access a 2nd input
> document and path.
> My input source (*.xml) looks like this:
>
> <Portlet src="mydoc.xml" path="FirstSibling"/>
>
> I tried:
>
> <xsl:variable name="src" select="Portlet/@src" />
> <xsl:variable name="path" select="Portlet/@path" />
> <xsl:for-each select="document($src)/{$path}">
> 	<xsl:copy-of select="Row" />
> </xsl:for-each>
>
> But this doesn't work as it doesn't like the data type for
> $path.  How can I
> accomplish my desired result?
> Is it possible to do this with just one variable? or no variables?
>
>  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.