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

Re: constructing a "variable" select argument

Subject: Re: constructing a "variable" select argument
From: "Tracey Zellmann" <tracey.zellmann@xxxxxxxxxxx>
Date: Mon, 27 Feb 2006 20:31:35 -0500
variables as arguments svg
Thanks very much for your help.

I have tried, but still can't get it to work for the Track. The position and Histogram attributes are perfect.

I have the luxury of also conrtolling the source xml document, so, after seeing how relatively easy it was to get the attribute values to work, I have changed the design so that the Track is also an attribute. I have gone through all the progarms and structures and accomplished that (Thank goodness for global edit and replace functions). Now I can cleanly redesign the templates.

----- Original Message ----- From: "Michael Kay" <mike@xxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, February 27, 2006 6:14 PM
Subject: RE: constructing a "variable" select argument



I have this statement:
<xsl:copy-of select="/Report/TrackT1/Position[@position='Left
Front']/MCHistogram[@id='1']/svg:svg"/>

However, the TrackT1 part of the expression can also change -
to TrackT2,
TrackT3, Track5-18, etc, taking on various values.

/Report/*[name()=$param]/Position


if the variation is more than a change of name then in XSLT you can invoke a
function here:


/Report/f:find-track(., $param)/Position

Michael Kay
http://www.saxonica.com/

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.