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

RE: XSLT 2.0 processor signalling error, for type erro

Subject: RE: XSLT 2.0 processor signalling error, for type errors
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 8 Oct 2008 15:35:17 +0100
RE:  XSLT 2.0 processor signalling error
> In case of Saxon, would you say that there is some 
> intermediate representation? I think, the user (or, 
> programmer) has the view that he/she is just running a XSLT 
> program in one pass.

If you look at the various APIs - including the JAXP API, it's clear that
there is one operation that creates a Templates object, and another
operation that uses the Templates object (repeatedly, and in multiple
threads, if you wish) to do a transformation. The Templates object is the
"compiled" stylesheet. In Saxon this is a heavily optimized expression tree
rather than a sequence of instructions, but it's conceptually the same.

(Saxon-SA in the case of XQuery also allows you to generate Java code from
the expression tree, in which case the compiled representation of the query
is a Java program.)
> 
> I might guess, that prior to creation of the result XDM tree 
> it's compilation. Does XSLT 2.0 spec define compilation and 
> runtime phases for XSLT?
> 
Not in so many words, but the distinction is there in the way error handling
is specified, in the distinction between the static and dynamic context, and
in facilities like use-when.

The XPath 2.0 spec includes a processing model that makes a more explicit
distinction. It refers to the two phases as "static analysis" and "dynamic
evaluation". The term "compile" is deliberately avoided as it could be taken
to prejudge implementation strategies. The output of the analysis phase is
called an "operation tree", but there's nothing that says it needs to really
be a tree.

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.