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] xml schema

[ Lists Home | Date Index | Thread Index ]

Dare wrote:

> The advice on avoiding chameleon schemas could be fleshed out. 

I don't wish to enter the debate about the man vs the matter, but
on matters of fact, the example given of chameleon schemas is 
factually incorrect, I believe.

Error 1: Reference to person type in main schema.

The master schema makes reference to 

<xs:element ref="person" maxOccurs="unbounded" />

refs are treated as QNames, and without a default namespace, 
"person" is a reference to {None}person. 

Having no namespace, the definition of person in the included
schema is coerced into the http://example.com namespace. Thus
the validator should complain about the reference to person
in the including schema and XSV and MSXML do.


Error 2: Assertion that ref="familyName" should explictly placed in
the http://example.com namespace.

Any ref with a {None} namespace in a chameleon schema will be coerced 
into the namespace of the includer. Thus there is NO need to explicitly
place familyName in the target namespace. Indeed, if this assertion
were correct, chameleon schemas would be pretty useless. See

http://lists.w3.org/Archives/Public/xmlschema-dev/2001Oct/0123.html

With error one above corrected, both XSV and MSXML validate the included
schema without change to the included schema.


The author's other points may or may not be valid, and the use of chameleon
schemas may or may not be bad, but factual errors tend to cloud the issue 
and lead to suspicion about the validity of the other arguments put forward 
by the author(as distinct from suspicions about the author themselves).

Regards
Michael








 

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

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