Roots of the DTD

Matt Mower m.mower at unl.ac.uk
Wed Jun 10 18:45:18 BST 1998


On Fri, 05 Jun 1998 13:12:59 +0000 (UT), "Simon St.Laurent"
<SimonStL at classic.msn.com> wrote:

Please forgive me for jumping into this conversation at this late stage,
and let me prefix my comments with the information that I am a relative
novice in XML with no SGML background....

>>I don't like telling people they can use DOCTYPE or XSchema PIs but not both. 
> I 
>>also don't like having to write a long list of conflict resolutions -- it 
>just 
>>makes XSchemas harder to use.  In both cases, it feels like we are imposing 
>>requirements not in the XML spec.  Ideas?
>
>Perhaps the simplest way to deal with this is to leave roots _out_ of the 
>XSchema PI. I always thought it was kind of silly to declare it in DOCTYPE - 
>after all, the root element should be the first and last thing you see in a 
>document, and an application should be able to figure it out.  It seems to me 
>like redundancy, though there may be reasons for it which I haven't fathomed.
>

If you want a reason for specifying a root element type external to a
particular document type then I think I can give you one:

I agree that once you have a document the root element is obvious,
however when creating new documents it is less so. My particular focus
is on editing tools for users who will not easily grasp XML.

We are looking at tools to edit certain types of document, and ideally
want the tool to do most of the work. Hence we need as much intelligence
in the document definition as possible (DTD's seem pretty poor in this
respect).

Given that the DTD doesn't define the root element a tool cannot
immediately know how to start creating the document - leaving this
choice up to the user, who may also not know.

When writing a particular DTD I would like the *option* of being able to
specify what the root element *must* be for a document that wants to
conform (is that right word?)  It's my type of document after all!

>The other reason for ignoring roots is that we _can't_ change DOCTYPE, so I 
>think we'd better just stay out of its way.
>

In my case once it has been set then you are safe to leave it alone.

I hope I am not missing the point too much.

Best regards.

Matt.

p.s. I have been a bit vague with my use of 'document definition', when
I say DTD I usually mean it in an external sense.

-- 
Matt Mower, Information Systems Team, University of North London
T: +44-(0)171-753-3288 F: +44-(0)171-753-5120 E: m.mower at unl.ac.uk


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