inclusions/exclusions/named groups

Marcus Carr mrc at
Wed Dec 17 21:46:39 GMT 1997

Andrea Anders wrote:

> I am a amateur in xml...

As are we all...

> I try to transform a SGML-DTD into XML (I use MSXML-parser). My questions are:
> 1) Neither SGML-inclusions nor -exclusions are allowed in XML!? How can I
> express this in XML?

Inclusions and (to a lesser extent) exclusions have never really been a great
idea in SGML because of the potential for them to behave incorrectly when parsing
from somewhere other than the top level of the DTD. Depending on how widely
they've been used and how big your data set is, I'd be inclined to process all of
your documents and generate a report of the ancestors elements of the inclusions.
This will give you some perspective about how they've been used - you can then
make informed decisions about their handling and requirements. Exclusions can be
overcome by remodelling the content models, but this could be a substantial
amount of work if your DTD is large and/or complex.

That's the way I wouldn't do it. I would maintain the data as SGML and call it
XML as required. Does it need to be valid, or can it just be well formed? Be
careful about white-space around the inclusions and exclusions if you use this
approach - no matter how you slice it, they're bad news.


Marcus Carr                  email:  mrc at
Allette Systems (Australia)  email:  info at
Level 10, 91 York Street     www:
Sydney 2000 NSW Australia    phone:  +61 2 9262 4777
                             fax:    +61 2 9262 4774

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