Between raw and cooked II: Are? DTDs are just for validation
jborden at mediaone.net
Sat Apr 3 01:39:15 BST 1999
David Brownell wrote:
>> Jonathan Borden writes:
>> > Beyond requiring that external entities and default attributes be
>> > expanded, is there a way to allow non- and validating parsers to
>> > process the same XML documents in a functionally similar fashion,
>> > that is, the same SAX events be fired or the same DOM tree be
>> > constructed whether or not validation is employed?
>Absolutely: when a nonvalidating parser reads all external entities,
>it behaves almost exactly like a validating parser that's configured
>to ignore validity errors.
You misunderstand me. I understand that it is possible for validating
and non-validating parsers to generate the same parse tree, what I am
looking for is a specification that parsers need meet to *ensure* that this
occurs. It is this specification that needs to be given an official standing
for use by XML applications.
Unless I am otherwise missing something (which was the question), the
only way to ensure that identical parse events and trees are generated by
validating and non-validating parsers is to specify that external entities
and default attributes etc. be expanded. Aelfred, the sun,ibm, and microsoft
parsers provide identical parse trees *because* entities are expanded and
attributes are defaulted.
Everyone agrees that non-validating parsers *may* expand external
entities and default attributes. The probem with XML is that this behavior
is *optional* for non-validating parsers.
This behavior is also the default behavior of IE5's parser. The problem
is that this behavior, common to aelfred, ibm, sun and microsoft' parsers
has no official standing, nor name, which is why I suggested that this be
termed "well-behaved" (ok pick something less contentious but just pick
something!!) and be given a specific standing in the XML spec. That way, as
an XML application writer I can specify the needed features of the parser in
terms of a spec.
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;
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev