OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] using schemaLocation to point multiple same namespace sche

[ Lists Home | Date Index | Thread Index ]
  • To: "Klotz, Leigh" <Leigh.Klotz@pahv.xerox.com>,"Wo Chang" <wchang@nist.gov>,"XML" <xml-dev@lists.xml.org>
  • Subject: RE: [xml-dev] using schemaLocation to point multiple same namespace schemas
  • From: "Dare Obasanjo" <dareo@microsoft.com>
  • Date: Wed, 4 Sep 2002 17:29:00 -0700
  • Thread-index: AcJUb5JXVO7vunHYSXiLbVFVRZ/M0AAAVqAA
  • Thread-topic: [xml-dev] using schemaLocation to point multiple same namespace schemas

> -----Original Message-----
> From: Klotz, Leigh [mailto:Leigh.Klotz@pahv.xerox.com] 
> Sent: Wednesday, September 04, 2002 4:43 PM
> To: Dare Obasanjo; 'Wo Chang'; 'XML'

> Naively (i.e., before today) I'd have thought you define a 
> language that uses this  <? xml version="1.0 ?>  <validate 
> xmlns="urn:mystuff" 
>            schemas="http://www.example.com/schemas/money.xsd 
>                     http://commerce.example.com/schemas/po.xsd 
>                     http://www.example.com/schemas/checks.xsd";
>            document="file://po.xml" />
> to mean "validate the po.xml file with the three xsd files 
> specified, and figure out their namespaces."

W3C XML Schema it does not work that way. You either specify a single
schema without a target namespace or multiple pairs of target namespaces
and schemas. The fact that one can only specify a single schema without
a namespace implies that the namespace<->schema location pairs are meant
to be unique per namespace. 
> ANSWER: If you allow money.xsd and checks.xsd both to specify 
> types in the same namespace, it's hard to implement a 
> processor for this validation language.  At least with the 
> Microsoft .NET Schema validator, 
>Is this an implementation convenience as well, or is it an 
>expression of some deeper issue about schemas and document classes 
>and namespaces?  

Like I said, the REC gives a lot of leeway. It is conceivable that an
implementation would honor all specified schemas with the same target
namespace (or no target namespace) but this would add complexity and
open a number of questions 

* Should all the schemas be merged before into one giant pseudo-schema
before validation? If so what happens upon errors related to this
merging such as redeclarations of the same global types or elements? 

* Should the document be validated against each schema in turn? If so,
doesn't this hurt performance? 

* Should other specified schemas only be consulted when the current
element or attribute being validated cannot be located in the schema?
This is basically, a lazy version of the merging option that just delays
the tough questions as to what to do upon encountering redeclarations
and the like. 

We decided to stick with the simple and straightforward option of
respecting only the first schema in the list of schema locations given
for a particular namespace. In our opinion, such interactions between
schemas should be explicitly specified at the schema level and not at
the instance document level. 

In any contest between power and patience, bet on patience.      

This posting is provided "AS IS" with no warranties, and confers no


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS