RE: [xsl] [XSLT]: Recursive Function to Add/Multiply

Subject: RE: [xsl] [XSLT]: Recursive Function to Add/Multiply
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 9 Oct 2006 10:20:53 +0100
> I have the following XML file, which represents expressions 
> with "+" and "*"
> 
> artihmentic operands:
> <m value="10">
>   <i value="5"/>
>   <m value="10">
>      <i value="2"/>
>      <i value="2"/>
>      <i value="2"/>
>   </m>
> </m>

It seems an odd choice of notation. How would you represent

(2+3) * (5+6)

Why the asymmetry between <m> and <i> elements? - m elements have the second
operand as a child, i elements have the second operand as a following
sibling.

Michael Kay
http://www.saxonica.com/

Current Thread