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

RE: using schemaLocation to point multiple same namespace sche

  • To: "Klotz, Leigh" <Leigh.Klotz@p...>,"Wo Chang" <wchang@n...>,"XML" <xml-dev@l...>
  • Subject: RE: using schemaLocation to point multiple same namespace schemas
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Wed, 4 Sep 2002 17:29:00 -0700
  • Thread-index: AcJUb5JXVO7vunHYSXiLbVFVRZ/M0AAAVqAA
  • Thread-topic: using schemaLocation to point multiple same namespace schemas

xsd target namespace
> -----Original Message-----
> From: Klotz, Leigh [mailto:Leigh.Klotz@p...] 
> 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. 

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

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.