Compound Documents - necessary for success?

Chris von See cvonsee at
Tue Feb 2 15:44:04 GMT 1999

At 12:33 PM 2/1/99 +0100, Ron Bourret wrote:
>I think that many of us have a notion of a "compound document" and "reusing 
>schemas" but that, for most of us, these notions don't go much beyond the 
>actual words and a hazy, utopic, AI-intensive dream that XML documents will 
>somehow magically recombine themselves to solve all of our problems.

<snip Players and Height DTD examples>

>What I think a lot of people would like is to automagically combine these 
>two DTDs so that the following document is valid:
>   <?xml version="1.0" ?>
>   <!-- Note the illegal syntax.  There is
>        currently no legal way to express this. -->
>   <!DOCTYPE "Player" System="players.dtd" System="height.dtd">
>   <Players>
>      <Player>
>         <Name>Joe Tall</Name>
>         <Team>Iowa Talls</Team>
>         <Height>
>            <Scalar>3</Scalar>
>            <Units>meters</Units>
>         </Height>
>      </Player>
>   </Players>
>This does not currently work for two reasons.  First, there is no way to 
>express that a document is valid under two different DTDs.  Second, the 
>above document is clearly not valid under either of the above DTDs.  To 
>create such a document under the current spec, we need to rewrite 
><!ELEMENT Players (Player*)>
><!ELEMENT Player (Name, Team, Height)>
><!ENTITY % height SYSTEM "height.dtd">

I may be showing my gross ignorance of both XML and namespaces here, but
isn't this at least part of the problem that namespaces were meant to
address? Granted, as Ron pointed out, a human still has to make the
decision as to whether "<Height>" is relevant to "<Players>", but once
there is agreement on what "height.dtd" represents authors should be able
to re-use that DTD wherever it makes sense.

I see the "height.dtd" as being something established by a world standards
organization that allows common representation of "vertical height"
information across all applications that use such things.  With that in
mind, it should be straightforward to use it in this context.



"Beware of all enterprises that require new clothes."

-- Thoreau

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

More information about the Xml-dev mailing list