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

RE: complex functions on subtrees.

Subject: RE: complex functions on subtrees.
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 28 Mar 2002 09:55:46 -0000
complex function
Yes, if the structure is fully marked-up then it should be possible to do
what you want in XSLT. It might be a good idea to use a processor that
offers stylesheet functions (xsl:function, EXSLT's func:function, or
similar). Saxon offers this extension and I think several other processors
do as well.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of croce
> Sent: 28 March 2002 09:29
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  complex functions on subtrees.
>
>
> Hi,
>
> I'm willing to do some complex transformations/queries on subtrees,
> such as examening an expression and retrieving the coefficient
> (nominator,denominator) of a variable or retrieving the constant term
> (nominator,denominator).
> <exp>/
> <exp>+
> <exp>*
> <var>a</var>
> <const>3</const>
> </exp>
> <const>5</const>
> </exp>
> <const>7</const>
> </exp>
> or thus the expression (3a+5)/7.  ( coeff(a)=3/7, constant term=5/7 )
> It would be a fair assumption that the expressions are linear
> expressions,
> note however that expressions like
> 5*((3a+5b)/3+a/4) are also possible and queries on them require some
> calculations.
>
> Would or would not be XSLT a good tool for that? (I suppose there are
> better...)
>
> I'm using XSLT because this is only a part of a bigger transformation.
> Is it possible to arrive (within XSLT) to an expression node,
> p.e. by means
> of <xsl:apply-templates select="exp">
> and call from within that template a non-xsl function to
> examen the current
> node "." (this node is off course an <exp>subtree)
>
> <xsl:template match="exp">
>     <xsl:value-of select="myfuction_getcoeff(.,'a')">
> </xsl:template>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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


Current Thread
  • Re: efficiency, (continued)
    • Wendell Piez - Tue, 26 Mar 2002 14:44:21 -0500 (EST)
    • Michael Kay - Tue, 26 Mar 2002 16:32:06 -0500 (EST)
    • David Carlisle - Wed, 27 Mar 2002 16:46:39 -0500 (EST)
      • croce - Thu, 28 Mar 2002 04:25:32 -0500 (EST)
        • Michael Kay - Thu, 28 Mar 2002 04:50:47 -0500 (EST) <=

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.