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

XSLT Functions in XSLT (Was: Re: XSLT 1.1 comments)

Subject: XSLT Functions in XSLT (Was: Re: XSLT 1.1 comments)
From: "Steve Muench" <Steve.Muench@xxxxxxxxxx>
Date: Tue, 13 Feb 2001 12:42:42 -0800
xslt functions comment
| > | I also like the idea expressed here of implementing extension
| > | functions in XSLT.
| > 
| > So do I. See Michael Kay's <saxon:function> extension
| > element for one idea of the shape that extension functions
| > in XSLT might take.
| > 
| <saxon:function> looks just right, now I've looked it up.

Some of the issues to think about on "Extension Functions in XSLT"...

Some folks see this as sugar syntax for an <xsl:call-template>.
That is, instead of doing:

    <SomeElement>
      <xsl:call-template name="my:foo">
        <xsl:with-param name="bar" select="5"/>
        <xsl:with-param name="baz" select="'boop'"/>
      </xsl:call-template>
    <SomeElement>

You write instead something like:

<SomeElement><xsl:value-of select="my:foo(5,'boop')"/></SomeElement>

or

<SomeElement><xsl:copy-of select="my:foo(5,'boop')"/></SomeElement>

This would mean that a function implemented in XSLT could
only return the same kind of thing that a template can
instantiate, that is, a result-tree-fragment.

Others see the potential to be more powerful, allowing
the extension function returned in XSLT to return any
kind of supported XPath expression of any type in
the XSLT datamodel (XPath + ResultTreeFrag + External Object).
This is the approach that <saxon:function> and it's 
<saxon:return> allow.

Allowing XSLT-implemented functions to be more powerful
than templates in this way, makes some folks think that
it is a move in the direction of making XSLT more into
a programming language, when there are already lots of
good general programming languages available. These are
the folks that are fans of user-written extensions, letting
XSLT be good for what it's good for, and letting 
external programming languages fill in when XSLT needs
a helping hand to accomplish a task that's easier to
do in a programming language.

These are some of the issues that the XSL WG is working on
tackling for XSLT 2.0. 

______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG
Author "Building Oracle XML Applications", O'Reilly
http://www.oreilly.com/catalog/orxmlapp/





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


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.