Lists Home |
Date Index |
Nicolas Lehuen wrote:
>... You summed it up perfectly : RDDL is for namespaces only. It
> won't work for document types. So let's try to solve the problem of
> types together.
To the best I can tell an XML 'document type' would refer to that which is
defined by a 'document type definition' i.e. a DTD. A 'document type', then,
is refered to by the <!DOCTYPE declaration, i.e. a PublicID/SystemID.
Catalogs are a terrific way to associate document types with 'stuff'.
This, of course, is mostly orthogonal to the namespace of the root element
of a document.
It is not completely orthogonal because XML 1.0 defines an 'element type'
simply as the name of an element (no hierarchy, inheritance etc.). The
namespace name of the root, or document, element of a document is of course
_part_ of the element's QName. So one can correctly call the 'document
_element_ type' the QName of the document element.
What is the relationship between the namespace name of the document element
and its XML type? To the extent that an element is said to be 'contained' in
its namespace, a namespace can be thought of as a container for such types.
To be perfectly clear, however, a namespace should not be equated with a
type. In my mind one of the most important reasons to propose RDDL in the
first place was the fear that namespaces would be incorrectly equated with
types. A DTD calls itself a type definition, and by extension a schema can
be thought of as a type definition (both are properly collections of type
definitions but nonetheless). If a namespace name were to directly reference
a schema definition, this improper equation might become a de facto
standard, and this is exactly what we wanted to avoid.
Regarding the 'problem of document types' either it is completely specified
by a DTD, or else we are extending 'document type' into the schema realm
(fair enough). Personally I think the issues related to schema composition,
especially across schema languages is an interesting one. Some time ago I
sketched some thoughts regarding a simple 'schema algebra'
http://www.openhealth.org/RDDL/SchemaAlgebra , ( this is not part of the
RDDL spec), precisely as an attempt to write down some principles in a
logical fashion, and in a way that does not depend on the intracasies of
DTDs, XML Schema, RELAXNG etc. I would say, however, that the 'problem', if
you define it as: how do we validate an XML document instance whose type
definitions can be _derived_ from their namespaces, but without respect to a
particular single schema. Firstly I don't know what the term 'valid' means
in such situatuions (that would be up to the specifics of the schema
language). So in general, the answer to many questions regarding 'document
type' fall outside the scope of RDDL. On the other hand, for the reasons I
have outlined above, at the very least it is important NOT to directly
relate a namespace to a single schema, and this is what RDDL prevents.
> I hope you have understood that I'm OK with RDDL for namespace description
> (apart a few critics). But it is only provided that RDDL is not used for
> what is not meant, i.e. a substitute for a resource directory for document
That would be an OASIS Catalog. Designed to locate a Document Type
Definition given a Public Identifier.