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: Norman Walsh <ndw@nwalsh.com>
  • To: xml-dev@lists.xml.org
  • Date: Sun, 30 Jul 2000 09:51:00 -0400

/ Joe English <jenglish@flightlab.com> was heard to say:
| 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.
[...]
| 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"

<aside>Wow. Some memes travel fast :-)

<note audience="implementors">Please make sure that href attribute
values are passed through the SAX entityResolver, ok? I'm thinking
of things like this and most especially about schemaLoc, xsl:include,
xsl:import, etc.</note>

</aside>

|     	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.

This solves one problem for the validator, but there are at least two
problems that need to be tackled. What this solution doesn't provide
is a mechanism for constructing content models that take elements from
multiple namespaces, such as this example from the DocBook/MathML DTD:

  <!ENTITY % equation.content "(alt?, (graphic+|mediaobject+|mml:math))">

But I think that problem could be solved as well, by introducing a
PI into the DTD.

  <?namespace-declaration prefix="mml"
                          uri="http://www.w3.org/TR/MathML2/dtd/mathml2.dtd"?>

This allows the validator to recognize that

  <!ELEMENT mml:math ...>

isn't declaring the element named "mml:math", but rather the "math"
element from the "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd" namespace.

The validator would also have to recognize that 'xmlns:'-prefixed
attributes are special and would probably benefit users if it had a
switch that allowed namespaced attributes to be used globally. Or not,
I dunno.

am I overlooking something significant, or do those two PIs and SMOP
about cover it?

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@East.Sun.COM | If someone tells you he is going to make 'a
XML Technology Center     | realistic decision', you immediately
Sun Microsystems, Inc.    | understand that he has resolved to do
                          | something bad.--Mary McCarthy




 

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

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