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


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: DOCBOOK: Re: XML Schemas and docbook documents

/ Elliotte Rusty Harold <elharo@metalab.unc.edu> was heard to say:
| At 4:19 PM -0800 11/15/01, Earl Bingham wrote:
| > Since I have heard that all new standards with W3 and since .NET is
| > completely XML Schema related, is DTD's dead?
| No, no, no, a thousands times NO! DTDs are not dead and they are not
| going away.  This is a common myth with little basis in reality.
| Schemas cannot do everything DTDs do, including some things that are
| crucial for DocBook like entity declarations.

Yes, entity declarations are, as far as I can see, the single
necessary feature that hasn't made the transition out of DTDs yet.
There are some obvious, if verbose, solutions for entity references in
element contexts, but none of them work in attribute contexts.

In other words,

  <e:entity name="ndw">Norman Walsh</e:entity>
  <para>Tell that to <e:ref name="ndw"/>.</para>

is almost a replacement for

  <!ENTITY ndw "Norman Walsh">
  <para>Tell that to &ndw;.</para>

but it doesn't work *at all* in

  <ulink url='imaginary-person-protocol:&ndw;"/>

| DTDs were designed for exactly the sort of applications that Docbook
| is, and they fit the needs of this technology very well.

This statement can be turned around, of course. DocBook is an
application that fits the constraints of DTDs very well because there
wasn't any choice.

There are some features of emerging schema languages that would allow
DocBook to enforce constraints that it can't in XML (but could in
SGML, like exclusions) and even some constraints that it never could
(like typed references).

| Document Type Definitions (DTDs) are an outgrowth of XML's heritage in
| the Standardized General Markup Language (SGML). SGML was always
| intended for narrative-style documents: books, reports, technical
| manuals, brochures, Web pages, and the like. DTDs were designed to

I would be mildly surprised if the percentage of "non-document" SGML
was as high as the percentage of "non-document" XML, but it's not fair
to characterize SGML as "document only". I know of a number of
applications of SGML that were used for exactly the sort of "data"
applications that so greatly influenced the design of W3C XML Schema.

| However, XML has gone well beyond the uses envisioned for SGML. XML is
| being used for object serialization, stock trading, remote procedure
| calls, vector graphics, and many more things that look nothing like
| traditional narrative documents; and it is in these new arenas that
| DTDs are showing some limits.

The really significant weakness of DTDs these days is poor namespace
support. I'm sorely tempted to extend DTD syntax to fix this. I'd love
to introduce a "namespace" declaration:

<!NAMESPACE xhtml "http://www.w3.org/1999/xhtml">

that would allow a DTD validator to recognize that


is the same as

  <xh:p xmlns:xh="http://www.w3.org/1999/xhtml">...</xh:p>

If you did that, and gave xmlns: attributes special treatment so that
they didn't have to be declared (because they aren't really
attributes), you'd be in pretty good shape.

| considerably easier to write than an equivalent schema. Parsers and
| other software will continue to support DTDs for as long as they
| support XML.

I'm not sure that's true. I won't be at all surprised if we see
applications in the next few years that are built on top of
well-formed parsers that ignore as much of the internal subset as they
legally can.

                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com>      | A man may fulfill the object of
http://www.oasis-open.org/docbook/ | his existence by asking a question
Chair, DocBook Technical Committee | he cannot answer, and attempting a
                                   | task he cannot achieve.--Oliver
                                   | Wendell Holmes

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC