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

Re: Big hierarchy of XML Schema documents ... which XMLSchema

  • From: Michael Kay <mike@saxonica.com>
  • To: xml-dev@lists.xml.org
  • Date: Thu, 29 Jul 2010 11:35:22 +0100

Re:  Big hierarchy of XML Schema documents ... which XMLSchema
On 28/07/2010 21:05, Costello, Roger L. wrote:
> Hi Folks,
>
> Suppose that my XML Schema imports/includes some XML Schemas and they import/include some XML Schemas and so on. That is, there is a big hierarchy of XML Schema documents.
>
> I envision two ways that XML Schema validators could be implemented:
>
> 1. On-demand: the validator brings in an XML Schema document only when it's needed. (On-demand/Just-in-time/Dynamic-Loading)
>
> 2. Not on-demand: when the validator brings in an XML Schema document it also brings in the XML Schema documents it imports/includes and the documents they import/include and so on. (What is the right term for this?)
>
> I am interested to know how these XML Schema validators operate with regard to being on-demand or not. Can you help to fill in this table please:
>
>    

By "on-demand" do you mean only during instance validation, when a 
component from the relevant namespace is first encountered? I think 
that's rather hard to achieve in practice. The schema processor 
typically converts the grammar for the content model of a complex type 
into a finite state machine, and you can't do that without knowing all 
the members of a substitution group, which you don't know until you've 
read all the schema documents. Also, it would mean that some errors in 
schemas (notably UPA violations) would not be found until you first used 
the schema with an instance document that triggered the appropriate checks.

Some degree of incremental schema construction is implied by the spec, 
in the case where an instance document contains multiple 
xsi:schemaLocation attributes (e.g. an xsi:schemaLocation for the SVG 
namespace might be found on an svg:svg element deep within the 
document). But processors have some discretion here in what they allow; 
Saxon wouldn't allow such a late-arriving schema document, for example, 
to add new members to a substitution group that has already been used 
for validating previous elements.

So for Saxon, as far as schema documents referenced using xs:import and 
xs:include are concerned, the answer is that they are processed eagerly. 
(The internal sequence of operations, whether schema documents are 
turned into schema components before all the imports/includes are 
processed, is another matter entirely and largely of no concern to the 
user.)

Michael Kay
Saxonica


[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.