W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2003

L3 Core: TypeInfo seems inadequate

From: Curt Arnold <carnold@houston.rr.com>
Date: Thu, 31 Jul 2003 23:59:05 -0500
Message-ID: <3F29F399.1080102@houston.rr.com>
To: WWW DOM <www-dom@w3.org>

Having attributes that allow you to readily determine if the type is 
complex vs simple or named vs anonymous would seem to be helpful.  Such as:

readonly attribute boolean isSimple;
readonly attribute boolean isAnonymous;  (may be redundant with typeName 
== null)

XML Schema Datatypes has equivalents for the DTD attribute types which 
could be used instead of null and attribute type property.  The current 
definition would not provide an easy way to distinguish between:



<!--  contrived, no namespace schema   -->
<xsd:simpleType name="CDATA"/>
<xsd:attribute name="name" type="CDATA"/>

An anonymous type could be nested many levels down in the content model, 
a containingElements NameList attribute could be used to enumerate the 
element names.  For the schema:

<xsd:schema targetNamespace="http://www.example.com/typeinfo">
<xsd:element name="hello">
             <xsd:element name="world">

The TypeInfo associated with the world element in <hello 

Would have

typeName == null,
typeNamespace == null,
isSimple == true,
containingElements.getNamespace(0) == "http://www.example.com/typeinfo",
containingElements.getName(0) == "hello"
containingElements.getNamespace(1) == null (if elementFormDefault = 
false) or "http://www..."
containingElements.getName(1) == world
Received on Friday, 1 August 2003 01:23:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:11 UTC