[xslt] xsltproc xsl:with-param not working properly



thankfully i was able to duplicate the problem with a smaller xml file 
and smaller xsl file ( mine is convoluted )
the problem is that xsl:with-param the values are not comming through 
into the applied templates,


hope there is enough info here:


h24-79-244-68# java org.apache.xalan.xslt.Process -IN new.xml -XSL new.xsl

      
        11 + 33 = 44
      
        55 + 111 = 166

h24-79-244-68# xsltproc new.xsl new.xml

      
        11 + 33 = 44

h24-79-244-68# xsltproc --version
Using libxml 20423, libxslt 10019 and libexslt 710
xsltproc was compiled against libxml 20423, libxslt 10019 and libexslt 710
libxslt 10019 was compiled against libxml 20423
libexslt 710 was compiled against libxml 20423



<!-- http://www.zvon.org/xxl/XSLTreference/OutputExamples/example_2_8_frame.html -->

<AAA >
          <BBB>bbb </BBB>
          <CCC>ccc </CCC>
      </AAA>

<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"; version = "1.0" >
<!-- http://www.zvon.org/xxl/XSLTreference/OutputExamples/example_2_8_frame.html -->

          <xsl:output method = "text" />

          <xsl:template match = "/" >
               <xsl:call-template name = "print" >
                    <xsl:with-param name = "A" >11</xsl:with-param>
                    <xsl:with-param name = "B" >33</xsl:with-param>
               </xsl:call-template>
               <xsl:call-template name = "print" >
                    <xsl:with-param name = "A" >55</xsl:with-param>
               </xsl:call-template>
          </xsl:template>

          <xsl:template name = "print" >
               <xsl:param name = "A" />
               <xsl:param name = "B" >111</xsl:param>
               <xsl:text >
      
        </xsl:text>
               <xsl:value-of select = "$A" />
               <xsl:text > + </xsl:text>
               <xsl:value-of select = "$B" />
               <xsl:text > = </xsl:text>
               <xsl:value-of select = "$A+$B" />
          </xsl:template>
     </xsl:stylesheet>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]