W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2000

Local element symbol space breaks with XML 1.0?

From: David Skogan <dskogan@cs.keele.ac.uk>
Date: Fri, 03 Mar 2000 14:50:31 -0800
Message-ID: <38C041B6.7F670CE3@cs.keele.ac.uk>
To: www-xml-schema-comments@w3.org
I personally think the local symbol space for types is a very good
thing. It allows local content elements to have local names, and solves
some of the global name space problems. Quote from 2.5:

"Attributes and local element declarations are special, in that every
type defines its own attribute symbol space and local element symbol
space, which are distinct from each other. In addition, top-level
elements (whose declarations are not contained within a   type
definition) reside in their own symbol space. "

But if I understand it correctly it may break with XML 1.0, which states
that "No element type may be declared more than once." I interpret the
local symbol space of a type to mean that I can define a type "T1" with
an element "E1" and then go on defining another type with the same
element name "E1" but with another type. Something like this:
 
<type name="T1">
	<element name="E1" type="integer"/>
</type>

<type name="T2">
	<element name="E1" type="T1"/>
</type>

<element name="T1" type="T1"/>
<element name="T2" type="T2"/>

XML instances based on this schema may look like:

<T1><E1>1324</E1></T1>
<T2><E1><E1>42</E1></E1></T2>

Here we have two "E1" elements that have different type, and this
probably willlead to ambiguities. Is this the intention and will it mean
that you break with XML 1.0? I'm quite happy with having it this way,
this means that you can reuse element names and in effect get a local
name space for each element.

Please clarify this, thanks.

David Skogan

-- 
David Skogan
Visiting PhD student,
Computer Science Dep., Keele University, Staffordshire, ST5 5BG, United
Kingdom
dskogan@cs.keele.ac.uk, http://www.ifi.uio.no/~davids/
(phone) +44 1782 584270
Received on Friday, 3 March 2000 09:53:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT