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

Re: concatenation of sibling names

Subject: Re: concatenation of sibling names
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Tue, 12 Feb 2002 15:56:17 -0500
xsl variable concatenation
[Saverio Perugini]
>
> Yes, both solutions presented so far on the list are fine, but as
> I said in my original post I am interested in storing the results
> of the concatenation in a parameter to use later in an XPath expression
> [as opossed to just simply outputting it].
>
> Is that feasible with <xsl:param>?
>

Well, you can assign the results to a (probably global) variable, and use
its value as the value of a parameter.  But whether you can use it in an
xpath expression depends on the expression.  The result is a string, not a
node-set, and cannot be made into a nodeset (unless you embed it in an
element and then use a processor-dependent RTF-nodeset conversion).
Equality tests for a node name or node content are unlikely to match it.
So it's not clear to me how you will make use of it.

It would help if you explain what you want to accomplish.  For what it's
worth, you can store and use the beast this way:

<xsl:variable name='element-name-list'>
<!-- Code to produce the list goes here -->
</xsl:variable>

<!-- Later, within a template, you could use this:-->
<xsl:apply-templates select='something-or-other'>
    <xsl:with-param name='element-names'
          select='$'element-name-list'/>
   </xsl:apply-templates>

<!-- Finally, within the xsl:called or xsl:applied template:-->
<xsl:template match='something-or-other'>
    <xsl:param name='elements-names'/>
   <!-- Do whatever it is you want to do -->
</xsl:template>

You will have to adjust the code to work in the definition of the variable.

Cheers,

Tom P


 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.