RE: [xsl] reading a document into a typed variable

Subject: RE: [xsl] reading a document into a typed variable
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 2 Oct 2009 17:23:22 +0100
> Thank you for your explanation. So if ever any other XSLT2 
> implementation will see the light of day, one could wait for 
> that implementation to behave differently again, because of 
> the maturity of type-checking?! I just expected type-checking 
> at run-time, that's why I had no clue about what was going on.

The working group made an explicit decision to allow processors to choose
how much type checking to do at compile time, and how much to defer until

For simple type errors like format-date(143), or 3*"London", I think people
would get quite irritated with a processor that didn't report this as a
compile-time error. And generally, the more type checking is done
statically, the less dependent you are on having 100% test coverage to find
all your coding errors. One the XQuery side, the WG set out initially to try
and define interoperable static typing rules in the formal semantics: but
they soon gave up, and recognized that processors could try to be smarter
(or less smart) than the rules in the spec. On the XSLT side, we never even
made the attempt to define the static typing rules.


Michael Kay 

Current Thread