xsl-list
[Top] [All Lists]

XSLT 1.0/2.0 forward/backwards compatibility behavior

2005-06-22 06:42:00

Hi,

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.

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? 


Cheers,

                Frans

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>