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

passing a relative select expression as parameter to s

Subject: passing a relative select expression as parameter to stylesheet
From: Lauren Blau Halverson <lauren_halverson@xxxxxxx>
Date: Mon, 19 Mar 2001 14:29:32 -0500
relative select
(using xalan-j1.2)

we are applying our stylesheet from within java code.

based on queries from the user, our application determines an
appropriate set of select expressions to apply to various types of
elements. These expressions are relative the element (for example, for
the element PERSON the select expression might be "name | desc |
@nationality").

We would like to be able to pass these in as parameters to a stylesheet.
(so for this example, one of the stylesheet parameters would be
<xsl:param name="PERSONexp"/>)

Then we would like to evaluate these expressions when in the context of
the template that processes the element. (example <xsl:template
match="PERSON"> <xsl:apply-templates
select="$PERSONexp"/></xsl:template>).

When we pass these in, we appear to have 2 choices.
1. we can pass them as an expression. In this case, it appears that the
expression is being evaluated against the root node of the document and
returning an emptynodelist.

2. we can pass them in as strings. In this case, the select fails with
an error because the value is a String.

So I have 2 questions. In situation 1, is there a way to delay this
evaluation until we are in the appropriate context? In situation 2, can
we somehow apply this string as if it were an expression?

Thanks,
lauren

 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.