[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: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Wed, 8 Oct 2008 17:13:53 +0530
Re:  XSLT 2.0 processor signalling error
Thanks, Mike and all for the clarifications.

Just out of curiosity, if I write say

int i = "abc";

in Java

I would get a compilation failure (even if the variable is not used).

XSLT 2.0 it seems follows a different philosophy (lazy evaluation, as
Andrew wrote). Also in XSLT, there is no concept of compilation and
then executing the binary code (as in Java). Though, I think there are
processors which do this. For e.g., Xalan interpretive processor, and
also Saxon compiling the XQuery programs to Java classes.

Most of the time, XSLT compiles the program and executes it in one
pass. Can we say XSLT is a interpreted language, like say JavaScript?

Any thoughts please, on this design of XSLT ...

On Wed, Oct 8, 2008 at 4:35 PM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> What is happening here is that Saxon is detecting the type error dynamically
> (at execution time) rather than statically (at compile time), which means it
> doesn't get detected if the variable is never used (variables that are never
> used are never evaluated).
>
> This is entirely conformant behaviour - run-time errors aren't reported if
> the code doesn't get evaluated, and it's up to the processor to decide
> whether or not it needs to evaluate the code in order to produce a result.
>
> It looks as if there's room for some extra static type checking here,
> however. Again, that's at the discretion of the processor.
>
> Michael Kay
> http://www.saxonica.com/


-- 
Regards,
Mukul Gandhi

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.