[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Evaluation of MathML using XSLT

Subject: Re: Evaluation of MathML using XSLT
From: "Peter Rushforth" <peter.rushforth@xxxxxxxxx>
Date: Thu, 7 Feb 2008 08:03:36 -0500
Re:  Evaluation of MathML using XSLT
Hi David,

Thanks for your response.

> yes in our case we're generating (C, C#, ...) code with xslt  so the math
> evaluation is defered to the result evaluation, not actually evaluated
> in the stylesheet.

I'm thinking of business inputs which are xml and therefore prime
fodder for XSLT
stylesheets, but for which the processing rule is encoded in an external
document, which might itself be a stylesheet snippet.  Realizing that XSLT is
perhaps not the best place to do math,but often it is expedient.

The "business rule" would be a combination of XSLT and MathML, perhaps
encoded together, such that when transformed, would be executable,
perhaps by the next (XSLT) step in the pipeline.

An input business rule might look something like:

<xsl:template match="PurchaseOrder">
  <xsl:for-each select="LineItem">
    <math xmlns="http://www.w3.org/1998/Math/MathML">
     <!-- calculate the tax per item, or something -->
      <apply>
       <times>
        <cn/>
        <cn>0.05</cn>
       </times>
      </apply>
    </math>
  </xsl:for-each>
</xsl:template>

(Sorry for the lame example! )

The output would be an actionable XSLT template, which when loaded
into a stylesheet
,compiled  and applied to input document containing PurchaseOrder elements
would do the work.

I'm certain C would be faster, but maybe the combination of XSLT and MathML
might allow a nice friendly input system.  But, perhaps it would
be just as possible to generate C code that would work similarly and perhaps
the result would be more satisfactory because of performance.

Cheers,
Peter

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.