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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Does DTD validation work with namespaces?

[ Lists Home | Date Index | Thread Index ]
  • From: Norman Walsh <ndw@nwalsh.com>
  • To: xml-dev@lists.xml.org
  • Date: Wed, 09 Aug 2000 09:24:02 -0400

/ Amy Lewis <amyzing@talsever.com> was heard to say:
[...]
| A treatise combining elements of mathematics, chemistry, with
| illustrations and bibliographic information can't be written?

Sure it can. But if I was doing it, I'd want a combination of schemas
(XML Schemas, DTDs, whatever) that defined what the legitimate
combination of vocabularies was. I don't see how to validate
documents, in any meaningful sense, otherwise.

Is this valid?

  <docbook:para>This is some text
  <html:i>with emphasis</html:i>
  </docbook:para>

Well, I suppose if your processing model is that all things not in
your namespace are ignored, then it is. But if I was writing
stylesheets, or software to do semantic indexing, or any other
application I can think of, it wouldn't be meaningful validity.

Consider this:

  <docbook:para>This is some text
  <html:i>with emphasis <docbook:inlinemediaobject>
  <docbook:imageobject><docbook:imagedata fileref="foo.png"/>
  </docbook:imageobject></docbook:inlinemediaobject></html:i>
  </docbook:para>

If you don't constrain how vocabularies are mixed, it just becomes
hopelessly messy.

If you want ANY, you have the DTD "ANY" content model and XML Schemas
gives you finer control. I could write an XML schema, for example,
that said that the content model of "equation" was a couple of DocBook
elements or anything from the MathML or SVG namespaces. (But not from
arbitrary other namespaces).

| SVG, at least, is intended for inclusions, rather than for the creation
| of standalone documents; is this inclusion only via XInclude/XLink?

No, but in DocBook it'll only be allowed inside <mediaobject> and
<inlinemediaobject>. Just because it's intended for inclusion, doesn't
mean that it makes sense to include it *anywhere*.

| Or could I create a grand-unifying DTD for work in the field of
| statistical chemistry (say) that, by importing the domain-specific DTDs
| for mathematics, chemistry, graphics, bibliographies, and general
| document-oriented text, permitted all of these elements, in some
| specified (to whatever degree of specificity) order?

That's what I'd do. Although I think exactly how is by no means a
question that we have a complete and satisfactory answer for at this
time.

| Or must I say, "Nope, can't do that," and "just" do XHTML?

No! :-)

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@East.Sun.COM | One's never alone with a rubber duck.
XML Technology Center     | 
Sun Microsystems, Inc.    | 




 

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

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