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

variable nodelist travarse how??

Subject: variable nodelist travarse how??
From: "Tareq Rahman" <saif_1587@xxxxxxxxxxx>
Date: Tue, 21 May 2002 14:31:47 +0600
tareq rahman
I have a variable declaerd as:

<xsl:variable name="varNodepkli">
      <xsl:for-each select="$abc">

               <xsl:element name="pkli">
                 <xsl:attribute name="pkli_oid">
                   <xsl:value-of select="@pkli_oid" />
                 </xsl:attribute>

                 <xsl:attribute name="pkli_ositem">
                   <xsl:value-of select="@pkli_ositem" />
                 </xsl:attribute>

                 <xsl:attribute name="pkli_clsz">
                   <xsl:value-of select="@pkli_clsz" />
                 </xsl:attribute>

                 <xsl:attribute name="pkli_colr">
                   <xsl:value-of select="@pkli_colr" />
                 </xsl:attribute>

                 <xsl:attribute name="pkli_size">
                   <xsl:value-of select="@pkli_size" />
                 </xsl:attribute>


<xsl:attribute name="pkli_qnty"> <xsl:value-of select="@pkli_qnty" /> </xsl:attribute> </xsl:element> </xsl:for-each> </xsl:variable>

Then i called a template as:

	<xsl:call-template name="pkliAdd">
			<xsl:with-param name="pk" select="$varNodepkli"/>
       </xsl:call-template>


The template needs to travarse by recursion all the pkli nodes in the variable. So i tried


<xsl:template name="pkliAdd">

	<xsl:param name="pk"/>
	<xsl:choose>
		<xsl:when test="$pk">

<xsl:element name="pkli">
<xsl:attribute name="pkli_oid">
<xsl:value-of select="msxsl:node-set($pk)/pkli/@pkli_oid" />
</xsl:attribute>
</xsl:element>


		<xsl:call-template name="pkliAdd">
			<xsl:with-param name="pk" select="following-sibling::$pk"/>
       	</xsl:call-template>

</xsl:when>

<xsl:otherwise>

</xsl:otherwise>

	</xsl:choose>
</xsl:template>



It seems that i can access the value of pk by "msxsl:node-set($pk)/pkli/@pkli_oid" in this manner but cant find way to call the
next sibling.


Please can anybody help me with this?







_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx



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.