SUMMARY: XML Validation Issues (was: several threads)
Jelks Cabaniss
jelks at jelks.nu
Tue Apr 6 05:00:43 BST 1999
Chris Lilley wrote:
> I don't sense consensus yet on whether client-side validation is always
> desirable; it clearly is in some cases and clearly adds little in other
> cases.
Wouldn't it depend on what the client is? The creation of XML 1.0 (as opposed
to just well-formed SGML) made validation optional; didn't the designers have
browsers in mind when they made this decision; in fact wasn't it the MAIN reason
they made such a decision?
> The assertion has been made that client-side validation is a performance
> load, compared to just parsing the dtd looking for fixed attributes etc;
> but no performance figures were made available. If someone has a parser
> they could instrument and provide some actual measurements on real-world
> data, that would help.
Assuming that validation were equally as fast, I still don't think that makes a
case for *forcing web browsers* to do what XML 1.0 says is optional. In another
message:
> My feeling is that there are three classes of implementation, that
> should all have names:
>
> minimal well-formed - never tries to follow external entities
> full well-formed - always tries to follow external entities
> full validating - always tries to follow external entities and validates
Agreed.
> and it should be possible to always derive what class of implementation
> a particular instance requires. My current take on this is that
>
> "standalone="yes" is how you declare that a minimal well-formed parser
> is sufficient; that
Sounds good.
> <!ELEMENT occurring anywhere in the internal or external subset is how
> you indicate that a validating parser is required
I don't like this (though evidently a number of people are assuming or
advocating it). If validation is optional, it's optional -- even if there's a
stray <!ELEMENT ...> in the DTD. Maybe the author is building his DTD and
doesn't want to validate it until he's good and ready. Maybe it's an older DTD,
he doesn't care about validity any more, and all he wants are default attributes
for styling purposes. Must he remove all <!ELEMENTs just to make it viewable in
a web browser?
If there is to be a way to *force* validity by specifying it in the document
instance, the only way I can see is by amending the spec with something like (as
I believe you yourself suggested in passing)
valid="yes"
in the declaration.
> and that all othger cases are saying that the full-well-formed parser is
> required.
That sounds good.
But IMO "all other cases" should currently include documents having DTDs with
<!ELEMENTs in them.
If documents should in fact be able to demand "Hey, if you're a validating
parser, validate me NOW!" (and there do seem to be some compelling occasions for
it), a <!ELEMENT in the DTD doesn't impress me as the proper "switch" for it.
/Jelks
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/ and on CD-ROM/ISBN 981-02-3594-1
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