XML processor profiles makes optional features look less optional

First, lets look at http://www.xml.com/axml/testaxml.htm for some
background.

The original XML spec said:

> When an XML processor recognizes a reference to a parsed entity, in
> order to validate the document, the processor must include its
> replacement text. If the entity is external, and the processor is not
> attempting to validate the XML document, the processor may, but need
> not, include the entity's replacement text. If a non-validating parser
> does not include the replacement text, it must inform the application
> that it recognized, but did not read, the entity.
> 
> This rule is based on the recognition that the automatic inclusion
> provided by the SGML and XML entity mechanism, primarily designed to
> support modularity in authoring, is not necessarily appropriate for
> other applications, in particular document browsing. Browsers, for
> example, when encountering an external parsed entity reference, might
> choose to provide a visual indication of the entity's presence and
> retrieve it for display only on demand.

Tim Bray's annotation to the first sentence of the second paragraph
reads:

> 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.
[example omitted]
> 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.

So clearly, the record shows that the framers of XML didn't intend
browsers to process external entities.

Yet, optional features are a slippery slope towards ending up
implementing features that are "incompatible with the desired behavior
of Web browsers" or that lead to situations that are "unacceptable".
People (including one of the editors of the XML processor profiles spec)
have asked for external entity processing in Firefox:
https://bugzilla.mozilla.org/show_bug.cgi?id=22942

Today, I WONTFIXed the bug.

With this context, I am unhappy to find that the XML Processing Model
Working Group is defining XML processor profiles using words that imply
that configurations that follow the rationale of the framers of XML are
no longer "recommended". Specifically, I'm unhappy about the prospect of
people reading the
http://www.w3.org/TR/2011/WD-xml-proc-profiles-20110412/ spec and filing
bugs arguing that Web browsers in general and Firefox in particular
should implement what the "W3C" says is "Recommended" when the
"Recommended" profile in this case includes things that have originally
been considered "incompatible with desired behavior" or "unacceptable".

Generally, committees make features optional because some stakeholders
wouldn't have agreed to the features being mandatory--i.e. the feature
are so bad. Coming back in another spec that makes the optional features
"Recommended" seems unfair to the stakeholder who didn't agree to making
the features mandatory in the first place.

In this case in particular, the optional feature in question--processing
external entities--doesn't even enjoy all-round support within the XML
community itself. The XML community has developed replacements for
DTD-based validation (RELAX NG), for DTD-based transclusion (XInclude)
and for DTD-based infoset augmentation (XSD). Efforts to outline next
generations of XML almost systematically omit external entity
processing. I think it fair to describe external entity processing as a
legacy feature--not as a feature that's recommended for new use.

Please use the word "legacy" or a similar word with negative
connotations to label profiles that involve processing external
entities.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Tuesday, 19 April 2011 10:52:08 UTC