SDD bogus

Tim Bray tbray at textuality.com
Fri May 8 17:19:08 BST 1998


At 09:51 AM 5/8/98 -0400, David Megginson wrote:
>As many XML parser writers have shown, resolving external entities is
>one of the easiest parts of XML 

Yes, but as is well-documented, difficulty is *not* the reason we made
their processing optional by non-validating processors.  The prime mover
behind this decision was a passionate presentation from Jean Paoli 
explaining that the auto-include semantic of parsed entities is just
*wrong* for web browsers.  I've attached an explanation of why at the
end of this message, but if you want to see it context, go to section 
4.4.3 of the annotated spec and click on the "H".

Having said that, Paul did raise a valid concern about the SDD (too bad
this issue wasn't pointed out before the spec was frozen).  Having said
*that*, I think, for reasons that are on the record in the same place,
that the problem the SDD exists to solve will essentially never
arise in real operational scenarios anyhow. -Tim

=================

>From the annotated spec at http://xml.com/axml/axml.html

Why Are External Entities
Included Optionally?

In discussion of external entities,
we realized that the semantics of
external text entities (compulsory
inclusion at the point where they
are encountered) are deeply
incompatible with the desired
behavior of Web browsers.
Consider the following example of
the beginning of an XML
document:

<?xml version='1.0'?>
<!DOCTYPE doc 
[ <!ENTITY MSA SYSTEM "http://www.microsoft.com/press/311.xml">
  <!ENTITY NSA SYSTEM "http://home.netscape.com/PR/x27.xml">
]>
<doc>Netscape today
announced that &NSA;. In
response, Microsoft
issued the following
statement: &MSA;.
... 

A Web browser is typically
making an aggressive effort to
display text to the user as soon as
possible, in parallel with fetching it
from the network. In the example
above, if a browser were required
to fetch and process all external
entities, it could only display the
first four words before starting
another network fetch operation.
To make things worse, bear in
mind that the replacement text for
the entity NSA could well include
other external entities which in
turn would need to be fetched.

This type of situation is
unacceptable. Hence the rule that
non-validating parsers need not
fetch external entities if they don't
want to.



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