|
[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
> 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). Java is a statically-typed language. > > 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? Compiled vs interpreted is a matter of the processor implementation, nothing to do with the language itself. And it's a pretty fuzzy distinction these days, because most processors actually compile down to some intermediate representation which is then interpreted by some kind of virtual machine: the question is how close that representation is to machine code. JIT compilation makes it even fuzzier. A clearer distinction is between strongly-typed and weakly-typed languages, or (almost the same) statically-typed and dynamically-typed. XSLT is essentially dynamically-typed (meaning type-checking isn't done until runtime) except that there's provision for optional optimistic static typing - which means you can report a compile-time error if you find a construct that's guaranteed to fail if executed at run-time (as in your example), but not (like Java) if there's merely a possibility that it might fail. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








