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

What is exciting in XSLT 2.0 (Was: Re: parameter

Subject: What is exciting in XSLT 2.0 (Was: Re: parameters in XSLT 2.0)
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 8 Jun 2005 21:37:29 +1000
deserialization xslt
With the introduction of xsl:function in XSLT 2.0 there are a number
of extremely interesting and important topics that are now becomming
more relevant but (I wonder why), are rarely discussed on this list.

   Function overloading -- limitations and how to overcome them.

   Parameter typing -- specific vs more general types, polymorhism,
how to determine dynamically the type of an actual argument, passing
functions as parameters.

   Function return type -- same as above plus returning a function as
the result, plus non-pure functions.

  Sequences  -- serialization/deserialization.

  Higher-order functions, partial application, controlling the
sequence of evaluation.

  Memoisation.

   Function libraries (it's a pity we can't have them in compiled form)

  Modelling the "continuation-passing" style.


Isn't this breathtaking!


Cheers,
Dimitre Novatchev






On 6/8/05, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> > First, am I right that if I use an "as" attribute of element() or
> > node() I am passing a reference to the original element or node, and
> > thus that this is an efficient operation?
>
> In the examples below you are passing a reference. If you used xsl:copy-of
> rather that xsl:sequence you would be creating a copy.
>
> The effect of using "as" on performance may be positive or negative. It may
> cause the system to do run-time checks that would otherwise not be
> performed. On the other hand, it gives the system compile-time information
> that may be useful to perform optimizations. I would use it as widely as
> possible because it speeds the development cycle and catches bugs more
> efficiently, and not worry too much about any effect on performance.
>
> >
> > Related, am I correct that these below are equivalent from a
> > processing
> > standpoint?
> >
> > <xsl:variable name="foo" select="bar" as="element()"/>
> >
> > <xsl:variable name="foo" as="element()">
> >    <xsl:sequence select="bar"/>
> > </xsl:variable>
>
> Yes.
> >
> > Finally, in general, under what conditions should one use tunnel
> > parameters?  I do a lot of parameter passing in my
> > stylesheets, though
> > the content of those parameters is typically fixed.
> >
>
> Use them if A calls E via B, C, and D, and you want to get information from
> A to E without cluttering the code of templates B, C, and D. The most
likely
> use-case for this is if you are reusing existing templates B, C, and D and
> want to reuse them unchanged.
>
> Michael Kay
> http://www.saxonica.com/

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.