OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] ANN: xpath1() scheme for XPointer

[ Lists Home | Date Index | Thread Index ]

We should remember that there's a reason entity resolution is not 
required in XML. The spec states:

	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 annotated spec elaborates:

	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.

These reasons apply equally well to XInclude as they do to external 
entities. Browsers may choose not to load included elements.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS