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

RE: XSLT 1.0/2.0 forward/backwards compatibility behav

Subject: RE: XSLT 1.0/2.0 forward/backwards compatibility behavior
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Wed, 22 Jun 2005 15:01:41 +0100
xslt 1.0 2.0
> I'm a bit confused with backwards/forwards compatibility
> between XSLT 1.0/2.0.
> Here's what I've concluded:
>
> An XSLT 2.0 processor running in backwards compatibility mode(due to
> xsl:version=1.0) accepts an illegal XSLT 1.0 stylesheet, as
> long as it is
> valid XSLT 2.0(say, an if statement was in an expression).
> Hence, one can
> write an "1.0" stylesheet which works just fine with an XSLT
> 2.0 processor,
> but is flagged as invalid at a static stage with an XSLT 1.0
> processor.
>
> I think this is right, because Saxon confirms it, and it is
> how I interpret
> the specifications.

Yes - sounds correct.

> What makes me wonder is because I find it hard to to motivate
> this behavior or
> see it in a practical perspective.
>
> From one perspective, I think I find it annoying, because one
> can't "simulate"
> an XSLT 1.0 processor with the xsl:version attribute, and
> hence be guaranteed
> a stylesheet works with a "real" 1.0 processor, without
> manually ensuring it
> will. But on the other hand, I can't tell what negative
> aspects it would lead
> to(of course, I could already have mentioned it..).
>
> Perhaps someone can clear my confusion and provide some background?

It's to ease the transition from 1.0 to 2.0 and is really useful.  You
can take your 1.0 stylesheet and pick-and-choose the features from 2.0
that you need and it all just works.  It's fantastic, really.

If you want to guarantee a 1.0 stylesheet works with a 1.0 processor
then use a 1.0 processor to test it, not a 2.0 processor (and use the
exact one you want to guatantee it for, I would say).

cheers
andrew

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.