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

Storing xpath expressions in a vaiable

Subject: Storing xpath expressions in a vaiable
From: Sridhar_Ramachandran@xxxxxx
Date: Thu, 28 Sep 2000 14:43:24 -0700
vaiable variable
Hi,
     I am trying to store an xpath expression in variable and trying to
evaluate it and storing the results in another variable. The xpath
expression used might depend on the value of some parameter(s) passed to
the style sheet. I am storing the xapth expression as follows :

     <xsl:variable name="note_filter_expression">
        <xsl:choose>
            <xsl:when test="$filter_template">
                <xsl:value-of select = "'//TABLE/NOTES[@TEMPLATE
=$filter_template]'"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="'//TABLE/NOTES'"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:variable>

In the above xsl code fragment, "filter_template" is a parameter passed to
the stylesheet. I would the like to evaluate the xpath expression stored in
$note_filter_expression and store the list of NOTES nodes returned in a
variable.  I need a node-list instead of RTREEFRAG, for later processing. I
am using XALAN and it does not seem to provide a node-list() funtion like
xt/saxon. I tried

 <xsl:variable name = "filtered_notes" select ='$note_filter_expression'/>

but this simply puts thestring representing the xpath expression into
$filtered_notes.

Any help is appreciated.

rgds

Sridhar


 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.