[Prev][Next][Index][Thread]

Re: XML and required DTDs



On Fri, 13 Sep 1996 19:17:10 -0400 Paul Grosso said:
>I'm having a hard time figuring out for myself the links from my posting
>to Michael's response

I'll try to answer your questions more directly this time.  Sorry for
any confusion.

>I don't understand how Michael's four choices relate to my thoughts.
>Forget choice (d) [we seem to agree there].  Either DTDs are always
>required or they're optional--forget about what for, since if they're
>optional, there will be times I don't have them, and that's the
>situation I'm addressing.

OK.  There may have been confusion on my part.  I took several
messages on this topic to reflect a fear that XML was heading toward
choice (d), and made it explicit primarily in order to say "No, that's
not what anyone seems to have in mind."

> ... If
>it's optional, there will be times that the option for it not to exist
>will be exercised [I think that's the definition of optional].
>
>In other words, I'll have the instance and not the DTD.  Now, what is
>an (XML or SGML) editor supposed to do?
>
>I assume an SGML editor will have to generate/intuit some DTD to
>which the instance conforms, and then it can happily use that to
>edit the document.  Fine.
>
>Now what about an XML Editor?   Do we envision such a thing as an
>XML Editor that works without declarations?

I think such software is imaginable.  For some circumstances, it
might be useful.  But I think an XML editor ought to be allowed to
insist that declarations be provided.  (This would be a restriction
on the All Apps Work on All Docs rule, but declarations can always be
generated if the user really really wants to use your editor.)

>If so, then we're at the same place I got to in my previous post:  "an
>XML content provider or editor can create new elements/attributes on
>the fly and insert them however they wish in the document (with about
>the only constraint being that the basic synchronicity of element
>hierarchy be maintained)?"
>
>Tim's post said, "I, and I think most people involved in this,
>absolutely definitely do envision having the equivalent of an SGML
>Markup Declaration."
>
>But how is that statement reconciled with choice (c) that makes the
>declarations optional?  If the declarations are optional, certainly
>we'll have the creation of tools that try to edit XML without
>declarations.

I took Tim to mean having markup declarations in the language, not
necessarily in all documents.  (That is, I think he, like me, was trying
to reassure you that choice (d) is not being proposed.) I agree that if
declarations are optional then some developers will produce editors that
try to edit XML without declarations, using an implicit 'Waterloo DTD'
(where all elements are declared ANY) -- ie enforcing nesting and not
much else.

>Is this a good thing?  (I don't know--maybe, in some circumstances.)  I
>was asking if this was a design goal.  I don't know how to interpret
>either Michael's or Tim's response.  I need some more help here from
>those more familiar with the ERB discussions.

As far as I know, it is neither a design goal of XML to encourage such
software, nor to forbid it.  Certainly it hasn't been discussed as such
in the ERB.

I hope this helps.

-Michael Sperberg-McQueen