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

RE: A sequence of more than one item is not allowed as

Subject: RE: A sequence of more than one item is not allowed as the [nth] argument of [function]
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 6 Mar 2005 23:39:57 -0000
sequence number not allowed
> I shall put my question more simply as ..
> If <xsl:stylesheet version="1.0" is specified , and if
> the stylesheet uses some XSLT 2.0/XPath 2.0 constructs
> , then should the new constructs work - if I am using
> a XSLT 2.0 processor? (as shown in example above)..

Yes. We decided that it was unreasonable to expect an XSLT processor to know
the version of the language at which each feature was introduced, so that a
feature introduced in version N of the specification would be rejected if
the stylesheet specified version N-1. With only two versions this might just
be manageable, but it's not reasonable when the number of versions grows.
It's particularly difficult for an XSLT 2.0 processor to enforce 1.0
restrictions when these are semantic rather than syntactic, for example the
restrictions on the ways in which result tree fragments can be used, because
this requires extra information (outside the scope of the 2.0 data model) to
be maintained.

So specifying version="1.0" in a stylesheet does not prevent 2.0 constructs
being used; all it does is to switch on "backwards compatibility mode",
which affects the results of a certain number of XPath and XSLT constructs
when evaluated under a 2.0 processor.

It's possible that some products might include an XSLT 1.0 processor and an
XSLT 2.0 processor bundled in the same software package, and use the version
attribute to decide which processor to invoke. (The two "processors" could
also, of course, share the same source code.) In that case, specifying
version="1.0" would invoke a 1.0 processor and then, of course, 2.0
constructs would be rejected. Saxon doesn't work that way, however.

Michael Kay
http://www.saxonica.com/

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.