RE: [xsl] How to use an attribute value passed as a param to a named template for pattern matching

Subject: RE: [xsl] How to use an attribute value passed as a param to a named template for pattern matching
From: "Hahn, Kimberly" <Kim.Hahn@xxxxxxxxxx>
Date: Mon, 12 Mar 2001 00:46:30 -0600
The error is occurring because you are trying to multiply a number with a
node list (//Try2[@type='b']/Value).  You probably need to get the sum of
both then multiply those results.

  <Total_2x3>
    <!--  Following commented out because it gives this error:
      XSLT Error (javax.xml.transform.TransformerException): Can not
convert #NUMBER to a NodeList!

    <xsl:value-of select="sum(//Try2[@type='a']/Value *
//Try2[@type='b']/Value)"/>

    end of comment-out -->
  </Total_2x3>
</Totals>
</Output>
</xsl:template>



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


Current Thread