Subject: [xsl] Problem in Using two RTFs together From: "Yang" <sfyang@xxxxxxxxxxxxx> Date: Fri, 15 Jun 2001 14:47:05 +0800 |
Hi, I got problem using two node-set together, and needs help. The problem occurs when relating two node-set by using apply-templates and with-param element. I created two rtfs(resultant tree fragments) for two xml docs;one called **rtf-zs** from modifing source xml docs. and another one **rtf-codeTable**, is a node-set from a code table. When I used the source xml ,// z:row ,as the attribute of select of apply-templates, the data from with-param can be accessed and can be used to display the desired output. However When I advanced to used the modifed source xml which is rtf-zs as the attribute of select of apply-templates then the data passed through with-param seems to be the empty one. What is missing here? I am using msxsl 3 for node-set extension function. Please help. Following xsl is for your reference. <xsl:template match="/"> <!-- Make a rtf called rtf-codeTable --> <xsl:variable name="rtf-codeTable"> <xsl:call-template name="codeTable"/> </xsl:variable> <!-- Make a rtf called rtf-zs for the modified source xml --> <xsl:variable name="rtf-zs"> <xsl:apply-templates select="//z:row" mode="n" /> </xsl:variable> <!-- template to list out information by joining two rtfs together --> <xsl:apply-templates select="//z:row" mode="a"> <=== this one works with source xml data <xsl:with-param name="rtf-codeTable" select="$rtf-codeTable"/> </xsl:apply-templates> <!-- this apply-templates using variable, makes param as empty node-set and data is missing, why???--> <xsl:variable name="zz" select="msxsl:node-set($rtf-zs)"/> <xsl:apply-templates select="$zz" mode="a"> <== the variable select attribute makes rtf-codeTable node-set empty... <xsl:with-param name="rtf-codeTable" select="$rtf-codeTable"/> </xsl:apply-templates> </xsl:template> <xsl:template match="z:row" mode="a"> <xsl:param name="rtf-codeTable"/> <xsl:variable name="ss" select="msxsl:node-set($rtf-codeTable)"/><==This content of node-set seems dependent on how I declair the xml source ...Processing ss data .. and z:row together </xsl:template> Sun-fu Yang sfyang@xxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] change the variable value, Michael Kay | Thread | [xsl] xalan, Jeel Patel |
Re: [xsl] change the variable value, Gavin Corfield | Date | [xsl] xalan, Jeel Patel |
Month |