[EMAIL PROTECTED] wrote:
>
> >Now that it is more often used as a data interchange medium it is
> >often no longer sufficient to rely on this internal mechanism for
> >specifying the DTD.
>
> Disagree. This makes it more important than ever that the document clearly
> identify how its contents were intended to be interpreted -- including any
> defaults and datatypes.

I don't disagree with this. Note that I *didn't* argue against specifying
the DTD in the document. I merely suggested that an application be able to
insist on using its own DTD for validation.

> >For this to be safe it must be guaranteed that the correct DTD
> >is used, namely the one that defines the format the application
> >can handle.
>
> Agreed, with slight modification: For this to be _safe_, the document must
> be one that the application is prepared to handle... which means it must be
> written using one of the DTDs which this application knows about.

Again, I agree.

> That doesn't mean "in accidental conformance with" that DTD or schema;
> it means _intended_ to be interpreted per those semantics.

Well, a DTD isn't quite sufficient to guarantee that the originator and
receipient are interpreting the content *semantically* in the same way. A
DTD/Schema merely defines the syntax and grammer, but not the semantics of
the content.

What DTD/Schema can do, however, is to do a lot of syntactic/gramatical
input validation that the application would otherwise have to do in code.
For example, via ID/IDREF (and better: key/keyref in Schema) one can let
the parser ensure that dangling references are absent. As long as the
application can ensure that this has been checked by the parser (with the
*correct* DTD/Schema) it can then simply *assume* certain things without
checking. For this to be safe it must either be able to force use of a
specific DTD/Schema, or it must be able to determine that the document
specified an acceptable DTD/Schema (as you appear to prefer). The latter
is probably more general in some sense, but determining whether the
specified DTD/Schema is acceptable may not always be trivial.

> Note that it's possible -- though probably undesirable! -- to have both
> a DTD _and_ a schema contributing to the content as seen by the
> application.

But Xerces doesn't allow both at the same time currently, or am I wrong
on this point?

Joachim

-- 
work:     [EMAIL PROTECTED]   (http://www.netacquire.com)
private:  [EMAIL PROTECTED]          (http://www.kraut.ca)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to