W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

trouble with "What's in the target Namespace?"

From: Don Smith <donalds@isogen.com>
Date: Fri, 19 Oct 2001 07:58:57 -0500
To: "Schema Dev \(E-mail\)" <xmlschema-dev@w3.org>
Message-ID: <000101c1589e$16b9ffd0$df0115ac@donsmith>
The question "What's in the target namespace?" has become a point of
discussion around here. Here's an example to consider:

<xsd:schema xmlns:xsd = 'http://www.w3.org/2001/XMLSchema'
	 targetNamespace = 'http://isogen.com/training'
	 xmlns:isg = 'http://isogen.com/training' >

<xsd:element name="performer" type="xsd:boolean"  />

<xsd:element name="performance">
    <xsd:element ref="isg:performer"  />
    <xsd:element name="BBB"  type="xsd:boolean" />
    <xsd:element name="NNN" type="xsd:date" />
    <xsd:element ref="BBB" />


In the content model, the first element declaration refers to the globally
declared "performer", which is clearly in the isogen namespace.
The second element declaration, "BBB", is locally declared and not in the
target namespace.
Likewise for the next declaration, "NNN".
The last declaration refers to the element declaration "BBB", and since that
schema component is not in the target namespace, the reference does not have
a namespace prefix for the isogen namespace.

The two references, one to a global declaration, and the other to a local
declaration, indicate the different symbol spaces for global and local
declarations, the latter not participating in the target namespace.

I conclude that when asking whether something is in the target namespace,
one must distinguish between schema components and information items in the
document instance. When speaking of schema components, locally declared
components are not in the target namespace. When speaking of information
items in the document instance, they either are or are not in the target
namespace depending on: 1) whether they map to locally or globally declared
elements, 2)the global/local "form" settings.

Is this correct? Where in the spec is the status of local schema components
relative to the target namespace addressed?

Don Smith
ISOGEN International
Received on Friday, 19 October 2001 08:58:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:54 UTC