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]

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


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


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