[Home]  [List]  [News]  [Docs]  [FAQ]  [Downloads]  [Resources]  [About]
Search :
/Home /List

list4xt : Mailing list for the XT users community.

[list4xt] Re: How to pass node set to a template?

Subject: [list4xt] Re: How to pass node set to a template?
From: Eric van der Vlist (vdv@dyomedea.com)
Date: 04/07/2001 - 09:15


Hi James,

James_Ma@i2.com wrote:
>
> Hi,
>
> In my xsl, I tried to pass node set to a template. The code looks
> like this:
>
> <xsl:template match="/">
>
> <xsl:variable name="taglib1">
> <xsl:apply-templates select="data_set/data"/>
> </xsl:variable>
>
> <xsl:call-template name="process_node_set">
> <xsl:with-param name="taglib"><xsl:value-of select="xt:node-set
> ($taglib1)"/></xsl:with-param>

To keep the status of "node set" to $taglib1, you should write:

<xsl:with-param name="taglib" select="xt:node-set($taglib1)"/>

(xsl:value-of is converting your node set to a string!)

> </xsl:call-template>
>
> </xsl:tempalte>
>
> <xsl:template name="process_node_set">
> <xsl:param name="taglib"></xsl:param>
> <xsl:apply-templates select="($taglib)"/>

This sould be :

  <xsl:apply-templates select="$taglib"/>

Hope this helps.

Eric

> </xsl:template>
>
> I got the following error when I processed the xml using above code:
> "SAXException: org.xml.sax.SAXException: cannot convert to node-set"
>
> Does anyone know how to pass node set to the template when using it?
>
> Appreciate any help/advise.
>
> -James
>

-- 
See you at XTech in San Diego.
             http://conferences.oreillynet.com/cs/os2001/view/e_spkr/790
------------------------------------------------------------------------
Eric van der Vlist       http://thepaymentguru.com -              http://collectionagencymerchantservices.com
http://merchant-account-services.org -        http://womensaction.org           http://highriskmerchantcashadvance.com
------------------------------------------------------------------------

-- Mailing list for the XT users community. (http://ezmerchantprocessing.com) (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)



Archive générée par hypermail 2b28 le 06/11/2001 - 11:46 CET

webmaster@4xt.org


A site designed by Dyomedea