xsl-list
[Top] [All Lists]

RE: [xsl] New XSLT 3.0 Working Draft

2012-07-10 13:01:17
Since relatively few folks adopted 2.0, what do we think the chances are of 3.0 
being adopted?

Michele

-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com] 
Sent: Tuesday, July 10, 2012 1:20 PM
To: Xsl-List
Subject: [xsl] New XSLT 3.0 Working Draft

There's a new Working draft of XSLT 3.0 - the first new public draft for
2 years - at http://www.w3.org/TR/xslt-30/.

There's an enormous amount of new material here.

Big features:

- Streaming -

The analysis of streamability has been greatly simplified: it no longer 
requires any complex data flow analysis. This is achieved largely by not 
allowing variables to be bound to the nodes in a streamed document. 
Apart from that, most of the new features introduced for the benefit of 
streaming, such as xsl:iterate and xsl:stream, are largely intact.

A major innovation is the introduction of "accumulators", values associated 
with nodes that can be computed during a streaming pass of a document; they 
have the usability of mutable variables while being defined in a purely 
functional way, and are sufficiently constrained that they don't inhibit 
optimization.

- Packages -

Intended for independent compilation of stylesheet components: they allow 
stylesheets to distinguish which components are internal and which are visible 
to the outside world. Gives general software engineering benefits by separating 
interface from implementation; allows constraining of what can be 
overridden/customized and makes overriding type-safe.

- Maps -

A new data type, similar to the dictionaries or associative arrays in other 
languages. The keys in the map can be any atomic value; the associated value 
can be any value whatsoever. A particular motivation for maps was that with 
streaming, you only get to see each thing in a document once, so you need to 
remember what you've seen for use later (for example, in an accumulator); so 
you need a richer data structure for holding this data. Maps also provide a 
useful mechanism for importing/exporting data to/from JSON format (for which 
there are new functions).

- Higher-order functions -

More an XPath feature than an XSLT one, functions are now first-class values 
and can be passed as parameters to functions, returned by functions, held in 
maps, etc etc.

Other things include:

* xsl:try/catch

* xsl:evaluate

* xsl:assert




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--