[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Benefits of xsd-types in XSLT


Subject: Re: [xsl] Benefits of xsd-types in XSLT
From: ac <ac@xxxxxxxxxxxxx>
Date: Wed, 18 Nov 2009 21:23:57 -0500

Hi,

Just a note, as I completely agree on the previous comments about, as Dimitri so well puts it, the "quantitative" benefits of strong typing, structured type definitions, and type standardization. I would simply like to also highlight some more "qualitative" aspects of XSLT type handling, including the support for implicit typing, the fact that explicit typing can be used as required, the fact that types can be expanded, defined, and checked in a formal process (e.g. schema), as well as the good support for type casting, detection, and conversion. This whole combination of quantitative and qualitative typing aspects and benefits greatly contribute to the power and programming elegance of XSLT.

Cheers,
ac


On Wed, Nov 18, 2009 at 8:33 AM, Jesper Tverskov <jesper@xxxxxxxxxxx> wrote:
Hi list

We often hear that one of the great benefits of using XSLT 2.0 is that
it uses the datatypes of XML Schema, most likely the same datatypes as
input XML and output XML, making type conversion not necessary.

It is easy to understand that the above is important and it is easy to
make up small examples like comparing a "date" datatype in XML Schema,
C# and Java.

But how great a benefit is it really? E.g.: when using XML data
binding, the XML Schema datatypes are, as far as I know, automatically
converted to the type system of C#, Java, etc. Does such automatic
conversion work or must it be fine tuned?


Sorry, it is not clear what the question really is...



One of the biggest advantages of having typed variables (including any document, any parameters and results from an xsl:template or from an xsl:function) is the static typed checking that will raise errors during compile time, vs run time or never raised at all.

Without the typing feature of XPath 2.0/XSLT 2.0 one would need
type-inference/theorem-prooving just to deduce the types of any
programming-language item, and in order to fully understand a program
(even one written by themselves).

Another big benefit is a new, huge opportunity for optimization.

The obvious benefit of this feature is reduced developer time,
increased quality, safety and performance.

The combination of all of the above results in a quantitative leap
forward in development technology and programmer's experience. The
gross benefit goes also to the end user.


Current Thread