[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Does DTD validation work with namespaces?

  • From: Norman Walsh <ndw@n...>
  • To: xml-dev@l...
  • Date: Wed, 09 Aug 2000 09:24:02 -0400

docbook namespaces
/ Amy Lewis <amyzing@t...> 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@E... | One's never alone with a rubber duck.
XML Technology Center     | 
Sun Microsystems, Inc.    | 

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.