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 ]

<Excerpt>
Having no namespace, the definition of person in the included
schema is coerced into the http://example.com namespace.
</Excerpt>

I *believe* there are more requirements necessary for coercion to occur, other than the included schema having no target namespace and the including schema having a target namespace:

	(1) The including schema must have a default namespace, and
	(2) The target namespace of the including schema must be the default namespace 

This was not the case in the article.

Please correct me if I am wrong on any of this.

Kind Regards,
Joe Chiusano
LMI

> **************************************************************************
>   Joseph M. Chiusano
>   Logistics Management Institute
>   2000 Corporate Ridge
>   McLean, VA 22102
>   Email: jchiusano@lmi.org
>   Tel: 571.633.7722
> **************************************************************************
> 


-----Original Message-----
From: Michael Leditschke [mailto:mike@ammd.com.au]
Sent: Monday, September 02, 2002 9:08 PM
To: Dare Obasanjo; xml-dev@lists.xml.org
Subject: RE: [xml-dev] xml schema


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





-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>




 

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

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