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

RE: Is schemaLocation just a hint in schema import?

  • From: "Antoli, Leo" <Leo.Antoli@M...>
  • To: Michael Kay <mike@s...>, noah_mendelsohn@u..., "'Xan Gregg'" <xan.gregg@j...>
  • Date: Tue, 10 Oct 2006 12:00:42 +0100

RE: Is schemaLocation just a hint in schema import?
Thank you for all the responses, they were very useful.


If everything is up to the implementation, you can not make
platform-independent schemas; you'll need to change schemaLocation values
depending on the schema parser / XML tools you're using.

Shouldn't it be better to have some common requirements (e.g. absolute http
paths are required to be understood in schemaLocation, and they'll point to
the schema file)? And implementations could provide extra mechanisms.

I'm talking about schemaLocation in imports, agreed that schemaLocation in
XML instances to validate it should be typically ignored and apply your own
schema information, you don't want to rely on external party schemas.



-----Original Message-----
From: Michael Kay [mailto:mike@s...] 
Sent: 10 October 2006 08:41
To: noah_mendelsohn@u...; 'Xan Gregg'
Cc: Antoli, Leo; xml-dev@l...; xmlschema-dev@w...
Subject: RE: Is schemaLocation just a hint in schema import?


> Having said all that, I find the case for making 
> schemaLocation a hint on the instance to be more compelling 
> than on import.  We did try to keep them parallel, but 
> perhaps that was a mistake.  Maybe we should have provided a 
> mode in which the schemaLocation on import was mandatory, but 
> the processor could decline to validate at all if it was 
> unhappy using it.

I quite like the formula that we now use in XSLT (3.10.1):

"After resolving against the base URI, the way in which the URI reference is
used to locate a representation of a stylesheet module, and the way in which
the stylesheet module is constructed from that representation, are
implementation-defined. In particular, it is implementation-defined which
URI schemes are supported, whether fragment identifiers are supported, and
what media types are supported. Conventionally, the URI is a reference to a
resource containing the stylesheet module as a source XML document, or it
may include a fragment identifier that selects an embedded stylesheet module
within a source XML document; but the implementation is free to use other
mechanisms to locate the stylesheet module identified by the URI reference."

This makes clear, I think, that the intent of the spec is that the URI
should be used to locate the stylesheet module, but leaves plenty of room
for implementations to use catalogs or URIResolvers to define indirection
mechanisms, or to cache stylesheet modules in a pre-compiled format. Unlike
the "hint" formulation, it sends a strong message that whatever algorithm is
used to find the module, the URI is expected to be the primary input to that
algorithm, and I think it gives implementors and users a much clearer idea
of what behaviour to expect by default and how this might be configurable in
practice.

Michael Kay



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.