Subject: Re: [xsl] Creating and passing XML String to xsl:call-template. From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx> Date: Sun, 27 Jan 2002 11:46:11 +0200 |
I want to create a XML String in a template and pass it as a paramter to xsl:call-template. There I want to parse that XML String and get the values. Reasons why I want to do this is to reduce number of parameters passed to xsl:call-template and other is to reduce the size of the calling template.
eg:
First template: <xsl:template name="FirstTemplate"> <xsl:variable name="XMLString">
<xsl:if test="cust_name1"> <name> <xsl:value-of select="cust_name1" /> </name> <xsl:if> <xsl:if test="cust_name2"> <name> <xsl:value-of select="cust_name2" /> </name> <xsl:if>
</xsl:variable>
<xsl:call-template name="SecondTemplate"> <xsl:with-param name="xmlstr" select="$XMLString" /> </xsl:call-template> </xsl:template>
<xsl:template name="SecondTemplate> <xsl:param name="xmlstr" />
here something like for each customer/name
-- get the name and print by formattig.
</xsl:template>
Can I do something like this. If not Can any body suggest an alternative of doing this.
-- Oleg Tkachenko Multiconn International, Israel
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Creating and passing XML Stri, Avula, Raj | Thread | RE: [xsl] Creating and passing XML , Michael Kay |
[xsl] Multiple XML Files and XSL, Gene LaCava | Date | Re: [xsl] Multiple XML Files and XS, Oleg Tkachenko |
Month |