Loading ...
Sorry, an error occurred while loading the content.

how to divide numbers in XSL expressions?

Expand Messages
  • genejimenez
    I want to divide the values of two nodes. XSL treats the slash as a parent-child relationship, not as
    Message 1 of 2 , Mar 14 10:22 PM
    • 0 Attachment
      I want to divide the values of two nodes.

      <xsl:value-of select="sum(root/item) / root/dividend" />

      XSL treats the slash as a parent-child relationship, not as division.
      How do I divide the sum by dividend.

      Also how do I compute modulo in XSL expressions?

      thanks
    • Murali T N
      Hi, For division, div can be used For instance and for modulo, mod Murali. genejimenez
      Message 2 of 2 , Mar 17 8:22 AM
      • 0 Attachment

        Hi,

        For division, div can be used

        For instance

        <

        xsl:value-of select=" 8 div 2"/>

        and for modulo,  mod

        <xsl:value-of select=" 5 mod 2"/>

        Murali.

          genejimenez <genejimenez@...> wrote:

        I want to divide the values of two nodes.



        XSL treats the slash as a parent-child relationship, not as division.
        How do I divide the sum by dividend.

        Also how do I compute modulo in XSL expressions?

        thanks



        ------------------------ Yahoo! Groups Sponsor ---------------------~-->
        Buy Stock for $4.
        No Minimums.
        FREE Money 2002.
        http://us.click.yahoo.com/BgmYkB/VovDAA/ySSFAA/JHfwlB/TM
        ---------------------------------------------------------------------~->

        To Post a message, send it to: xml-tips@...

        To Unsubscribe, send a blank message to: xml-tips-unsubscribe@...

        Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



        Do You Yahoo!?
        Yahoo! Sports - live college hoops coverage

      Your message has been successfully submitted and would be delivered to recipients shortly.