Hi, Jonathan.

"Winterflood, Jonathan" <[EMAIL PROTECTED]> wrote on 
2008-03-26 05:15:28 AM:
> Well that explains, Thanks a lot!
> However:
> I think Xalan should at least issue a warning when it encounters 
> <xsl:stylesheet version="2.0"
> The error when using multiple modes suggests I can use a whitespace-
> separated list of modes, which is part of xslt2.0 ( “”””An attribute
> whose value must be a QName or whitespace-separated list of QNames
> “”””) [maybe this is because Xalan is moving towards 2.0]

If an XSLT 1.0 processor encounters a stylesheet with a version="2.0" 
attribute on the xsl:stylesheet element, it's supposed to operate in 
forwards compatibility mode.  It's still a 1.0 processor, but it's 
supposed to ignore various errors, and carry on as best it can.  The idea 
is that users can write stylesheets that take advantage of new features of 
XSLT 2.0 (or future revisions of XSLT) on processors that support them, 
and revert to using older features with xsl:fallback (or at least fail 
with a meaningful error) on an XSLT 1.0 processor.

> OTOH, the program I edit the transformations in doesn’t complain 
> when I use these features while declaring <xsl:stylesheet version="1.0" 
…

If an XSLT 2.0 processor encounters a stylesheet with version="1.0", its 
supposed to operate in backwards compatibility mode.  All the XSLT 2.0 
features are still available, but the semantics of some operations are 
altered to be more likely to produce the same results that an XSLT 1.0 
processor would produce.

I hope that helps.

Thanks,

Henry
------------------------------------------------------------------
Henry Zongaro
XML Transformation & Query Development
IBM Toronto Lab   T/L 313-6044;  Phone +1 905 413-6044
mailto:[EMAIL PROTECTED]

Reply via email to