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

RE: How can i convert the variable value into xpath

Subject: RE: How can i convert the variable value into xpath
From: Mike Ferrando <mikeferrando@xxxxxxxxx>
Date: Sat, 9 Mar 2002 20:54:36 -0800 (PST)
xpath variable array
Dear friends,
I wonder if I am trying to do the same thing. What has come to my
mind as a possibility is:

<xsl:variable name="try-this" select="${@LINK}"/>
<xsl:copy-of select="$try-this"/>
or
<xsl:copy-of select="${@LINK}"/>

The nodes all have the same name element, but the attribute value is
different. That same value matches the variable names of an
xsl:include document. The end result is the node that is called by
the template is matched to an array. When the array match is found,
then the value of the attribute of that node in the array is then
taken for the variable name. This attribute value which is now a
variable is then called up to replace the node called by the
template.

<my:array LINK="n3">see also  Shall we dance in the King and I *root*
RODGERS1</my:array>
<my:array LINK="n4">see  Climb every mountain in the Sound of Musis
*root* RODGERS2</my:array>

<xsl:variable name="n3">see <EMPH RENDER="quoted">Climb every
mountain</EMPH> in SHOW MUSIC : Manuscripts</xsl:variable>
<xsl:variable name="n3">see also  <EMPH RENDER="quoted">Shall we
dance</EMPH> in the King and I in SHOW MUSIC : Full
scores</xsl:variable>

The result is that I can have many cross-reference nodes in my
document, but a prepared list of i) exact unique occurances in my
array and ii) a list of pre-formatted replacements. At the same time
I can create the ref numbers for each cross-ref in the document.

Of course saxon rejects my syntax, but how would I write it if I were
to do this? I will definitely check out the extension function
Michael mentioned in the mean time.

Needing a little help,
Mike F.

__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

 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.