This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problem in Using two RTFs together


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@unisvr.net.tw




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]