OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Question About Namespaces and DTDs

[ Lists Home | Date Index | Thread Index ]
  • From: Joe English <jenglish@flightlab.com>
  • To: xml-dev@lists.xml.org
  • Date: Tue, 25 Jul 2000 19:50:26 -0700


Simon St.Laurent wrote:

> At 12:31 PM 7/25/00 -0400, Norman Walsh wrote:
> > A schema language that's namespace aware is the answer.
>
> I have to admit that there are still too many days I wish someone had sat
> down and made DTDs namespace aware.  It still doesn't seem that impossible
> a thing to do, though it's probably been too late for a long while.


Maybe it would suffice to leave DTDs as they are,
and build a namespace-aware DTD-based *validator*.

It might work something like this: A document could
indicate that a particular namespace URI is bound
to a DTD via a processing instruction:

    <?xml-schema
    	href="urn:ndw:doctypes:docbook:3.1.7"
    	type="application/xml-dtd"
    ?>

The 'xml-schema' PI target is analogous to the 'xml-stylesheet'
target defined in [REC-xml-stylesheet].  The 'type' pseudo-attribute
indicates that the schema uses XML DTD notation (not sure what
the right MIME type for this is, if any).  The 'href' pseudo-attribute
specifies a URI for the schema.

The XML Namespace mechanism can then be used to bind element type
names to the schema: in the document instances, any QNames with a
URI equal to the one specified in the 'xml-schema' PI would be validated
according to the specified DTD.

    <db:article xmlns:db="urn:ndw:doctypes:docbook:3.1.7"
	...
    </db:article>

The text of the DTD itself could use NCNames, or even QNames
with a different prefix; the validator would only look at the
local-part of the name.

There are no doubt some issues to be resolved; for instance,
the usual namespace-related question -- do unprefixed attribute
names "belong to" the namespace of their parent element, the
default namespace, or to no namespace at all?

To be truly useful, such a validator would probably need to
be AFDR-aware as well.  Namespaced documents generally mix
and match elements from several namespaces; the ArcCFC
and ArcSupr facilities could be used to deal with "data islands"
conforming to the DTD embedded in a larger document,
and "foreign objects" embedded inside those data islands.

At any rate, I don't think [REC-xml-names] irrevocably breaks DTDs;
it only breaks [REC-xml]'s definition of DTD-based validation.


--Joe English

  jenglish@flightlab.com




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS