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

storing XPath Expression in a variabel, and using it

Subject: storing XPath Expression in a variabel, and using it in a document function
From: Linde Løver <lindelover@xxxxxxxxxxx>
Date: Wed, 21 Jun 2006 13:11:24 +0200
linde l ver
Hi!
This is a snippet from my xml source file:

<file collection="ieee" name="ex/2003/x1055">
<element path="/article[position()=1]/bdy[position()=1]" exhaustivity="?"/>
<element path="/article[position()=1]/bdy[position()=1]/sec[position()=4]" exhaustivity="?"/>


I want to use the information in the name and path attribute to retrieve elements among a set of xml files. For that I'll use the document() function like this:

<xsl:variable name="document" select="@name')"/>
<xsl:variable name="path" select="@path"/>
<xsl:variable name="docPath" select="concat('xml/', $name, '.xml')"/>
<xsl:apply-templates select="document($docPath)/$path">

Apparantly this is not working as the variable $path is not a node set. Do you know a way to make this possible? I read about the exslt dynamic evaluation, but I weren't able to make it work. Is that the correct way of solving this problem?

Regards

Linde

_________________________________________________________________
Trangt om plassen? http://www.hotmail.com MSN Hotmail gir deg 250MB gratis lagringsplass


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.