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

passing a node-set variable between an imported xsl an

Subject: passing a node-set variable between an imported xsl and back.
From: heiko@xxxxxxxxxx
Date: Tue, 31 Dec 2002 02:54:16 -0800 (PST)
nodeset variable
Hi XSL-List Members,

before i forget: best wishes for the next year.

here is my problem:

i wrote something like a parser, for an xml file that
is needed in i three xsl files. off course i want to
import this things because it will change often.

in the parser i create an node-set as variable like
this:
<!-- create a name of pack -->

<xsl:variable name="cjversion">
<xsl:variable name="pack">
   <xsl:choose>
     <xsl:when test="contains(articleName,'ESD')">
      <xsl:value-of select="normalize-space('ESD')"/>
     </xsl:when>
     <xsl:otherwise>
      <xsl:value-of select="normalize-space('BOX')"/>
     </xsl:otherwise>
   </xsl:choose>
</xsl:variable> 
....
later i create an nodeset in the same file with the
variable
....
<pos>
    <artname>
       <xsl:value-of select="$shortname"/>
    </artname>
    <artname_os>
       <xsl:value-of
select="concat($pack,'|',articleenv/name)"/>
    </artname_os>
     <artname_os_lang>
         <xsl:value-of
select="concat($pack,'|',articleenv/name,'|',articlelanguage/name)"/>
    </artname_os_lang>
</pos>
<!-- close cjversion variable -->
</xsl:variable>
<xsl:variable name="cjNO">
	<xsl:call-template name="makeIndex">
	 <xsl:with-param name="newnode"
select="xalan:nodeset($cjversion)/pos/artname_os"/>
	</xsl:call-template>
</xsl:variable>
that is my vartiable node-set i would like to import it
via 

<xsl:import href="http://localhost/parser.xsl" />

and use it here in the three other files like this:

<select width="267" name="A">
<xsl:for-each select="xalan:nodeset($cjN0)/key">
<option>
	<xsl:attribute name="value"><xsl:value-of
select="."/></xsl:attribute>
	<xsl:value-of select="."/>
</option>				
</xsl:for-each>
</select>

how do i have to realize it ! any help would be great.

thanks in advance.

Heiko

 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.