When is an attribute an attribute?

Rick Jelliffe ricko at allette.com.au
Wed Apr 8 06:40:12 BST 1998

-----Original Message-----
From: len bullard <cbullard at hiwaay.net>

> The funniest thing I've seen lately is a statement
> on the Microsoft XML site that XML gets rid of
> committees who design DTDs in favor of a
> more "organic" approach.  Lots of luck. ;-)


My book <plug type="shameless">The XML & SGML Cookbook</plug>,
due out next month, looks at this issue. In particular it gives some basic
and considerations that can be used for "rapid prototyping" a document type.

 Most document types require some rethought after deployment. Very few
actually have much of an idea of what their data contains. Anyway, when you
actually using markup systems you will want to make maximal use of the
tools you have bought. So even if a DTD was created without any
of the software to be used, there is often good reason to enhance the DTD to
make best use of the particular capabilities of the appliciations (and to
flaws that turn up).

DTDs made by committees often tend to be rather kitchen-sinkish. But this is
dealt with by dividing them into separate DTDs (especially for front and
which are more manageable, or by introducing "training-wheel" DTDs which
scare people off, rather than by saying they are over-engineered.

Documents and publications are much more
complicated than people want to accept: sometimes the only way is for people
to learn by being given a simple DTD and then having issues in their
prove to them that a larger DTD is actually what they require.

"Organic" is an attractive word. Being able to make ad hoc changes to DTDs
great if you are processing them, or if you have a family of documents which
similar but not exactly the same type. SGML systems have suffered in the
because DTD-alterations was often a large-scale exercise for gurus. XML is
doing good things in making this more difficult.

But the idea that XML markup declarations are inherently inflexible, while
declaration-less XML allows more "organic" development is spurious.

One trick SGML people use (this is adapted from Travis and Waldt's book) is
make explicit element types for unaccounted-for elements. This gives you
somewhere to park important data in the absense of DTD elements.
This kind of flexibility is available in any DTD: you don't need to abandon
XML markup declarations to get it. For example, the following declaration
is a good basis for such an element type:

<!-- "class" is the name the user might suggest for this element type
       if in a DTD.  "HTMLform" is the nearest HTML element type, to
       help rendering. -->
<!ATTLIST    new
    id        ID        #IMPLIED
    class  CDATA #REQUIRED
    comment    CDATA  #IMPLIED>
<new class="dog" HTMLform="em">Rover</new>

(Check out the HTML span and div elements too.)

Rick Jelliffe

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

More information about the Xml-dev mailing list