W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2004

qualified local/global Re: Namespace problem

From: Burak Emir <Burak.Emir@epfl.ch>
Date: Wed, 18 Aug 2004 15:32:55 +0200
Message-ID: <41235A87.1010404@epfl.ch>
To: George Cristian Bina <george@sync.ro>
CC: Volker.Zink@porabo.ch, xmlschema-dev@w3.org

Hello,

George Cristian Bina wrote:

> The global elements are in the schema target namespace. The local 
> elements are either in no namespace or in the schema target namespace 
> depending on the element/@form attribute or schema/@elementFormDefault 
> attribute. A local element belongs to the schema target namespace if
> 1. element/@form attribute is set to qualified
> or
> 2. schema/@elementFormDefault is set to qualified and the 
> element/@form attribute is either not present or set to qualified.


George Cristian Bina wrote:

> <schema xmlns="http://www.w3.org/2001/XMLSchema" 
> xmlns:plem="grips://xml.recom-verlag.de/comm/plem" 
> targetNamespace="grips://xml.recom-verlag.de/comm/plem"
>      elementFormDefault="qualified"
> ...
>
Thanks a lot George. My email was sent before I saw yours. I did not 
know the interaction between global and local definitions, neither that 
"unqualified" was the default setting. It is clear to me now why 
omitting the "plem" prefix would not have changed anything.

But still, a question remains (my knowledge of XSD and namespace 
interaction is quite poor):
Having switched to "qualified", why would one need to declare the "plem" 
prefix, in the instance as well as in the xsd ?

In the schema, the type FallImportExport is global, so in the target 
namespace, which is the same as the one referenced by the "plem" prefix

In the instance, since it is already the default namespace and it is not 
needed as a prefix anywhere, it is superfluous.

cheers.
Burak
Received on Wednesday, 18 August 2004 13:33:03 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:10 UTC