- From: <Noah_Mendelsohn@lotus.com>
- Date: Tue, 7 Mar 2000 22:03:12 -0500
- To: David Skogan <dskogan@cs.keele.ac.uk>
- Cc: www-xml-schema-comments@w3.org
>> 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." A DTD, which is what XML 1.0 discusses, can declare an element of a given name at most once. Schemas is free to invent its own notions of definition. Note that the following is well formed XML 1.0: <DOC> <PERSON> <TITLE>Ms.</TITLE> <NAME>Mary Jones</NAME> </PERSON> <BOOK> <TITLE>War and Peace</TITLE> <AUTHOR> <TITLE>Ms.</TITLE> <NAME>Leo Tolstoy</NAME> </AUTHOR> </BOOK> </DOC> Schemas lets you do what DTD's do not: make the titles and names locally scoped, and perhaps to have the person titles defined as an enumeration (Mr., Ms., etc.) ------------------------------------------------------------------------ Noah Mendelsohn Voice: 1-617-693-4036 Lotus Development Corp. Fax: 1-617-693-8676 One Rogers Street Cambridge, MA 02142 ------------------------------------------------------------------------ David Skogan <dskogan@cs.keele.ac.uk> Sent by: www-xml-schema-comments-request@w3.org 03/03/00 05:50 PM To: www-xml-schema-comments@w3.org cc: (bcc: Noah Mendelsohn/CAM/Lotus) Subject: Local element symbol space breaks with XML 1.0? 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 Tuesday, 7 March 2000 22:05:24 UTC