RE: [xsl] XSLT 2.0 *and* XSLT 1.0 validation -- how to?

Subject: RE: [xsl] XSLT 2.0 *and* XSLT 1.0 validation -- how to?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 22 Oct 2004 15:34:03 +0100
> Excuse me if this is a dumb or already discussed question.
> 
> Suppose I have XML Schema definitions for both XSLT 1.0 and XSLT 2.0. 
> 
> How will a validating processor know which schema to apply for which
> language? Both languages are defined in the same namespace... Was this
> an intentional effort of the XSLT 2.0 WG and why?

There has been a lot of discussion in W3C - not specifically in XSL WG -
about versioning of namespaces, and there is still work going on, but the
accepted advice at the moment is that you shouldn't create a new namespace
every time you extend the schema, especially if the new schema still allows
all instances that the old schema allows.

There does seem to be a certain amount of confusion in the schema world
about whether or not a namespace is intended to uniquely identify a schema.
On the one hand, xs:import is defined to import schema components for a
namespace, with the schemaLocation being merely a hint, and this doesn't
work well if there is more than one possible schema for that namespace. On
the other hand, it's always been part of the philosophy of XML Schema that
the schema you use for validation is chosen by you, the person doing the
validation, and different people are perfectly entitled to apply different
validation rules to the same instance document - for example, I might be
interested in seeing purchase orders that haven't yet been approved, but you
might want to apply stricter validation rules before they are sent out to a
supplier.

I'm told the Schema WG is embroiled in debate on the versioning issue at the
moment. In the meantime, I think the decision to keep the namespace for XSLT
2.0 is the correct one - it would be horribly disruptive to change it.

Michael Kay

Current Thread