Lists Home |
Date Index |
- To: "Klotz, Leigh" <Leigh.Klotz@pahv.xerox.com>,"Wo Chang" <email@example.com>,"XML" <firstname.lastname@example.org>
- Subject: RE: [xml-dev] using schemaLocation to point multiple same namespace schemas
- From: "Dare Obasanjo" <email@example.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
> 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
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.
PITHY WORDS OF WISDOM
In any contest between power and patience, bet on patience.
This posting is provided "AS IS" with no warranties, and confers no