W3C home > Mailing lists > Public > xsl-editors@w3.org > October to December 1999

External parsed entities (Re: Inconsistency between IETF and W3C...)

From: MURATA Makoto <murata.makoto@fujixerox.co.jp>
Date: Mon, 29 Nov 1999 14:35:52 +0900
Message-Id: <199911290535.AA03406@archlute.fujixerox.co.jp>
To: Dan Connolly <connolly@w3.org>
Cc: timbl@w3.org, simonstl@simonstl.com, ietf-xml-mime@imc.org, Tsmith@parc.xerox.com, xsl-editors@w3.org, masinter@parc.xerox.com
Chris Lilley wrote:
> > The text/xml MIME type isn't limited to well-formed documents, but
> > rather
> > to XML entities (c.f. 2nd para under 3. XML Media Types of
> > http://www.ietf.org/internet-drafts/draft-murata-xml-01.txt); so the
> > following:
> > 
> >         Four score and seven years ago
> > 
> > is a valid text/xml body, but an XML processor will burp cuz there's
> > no root element.
> 
> This is s agood point, which had escaped my notice before. Certainly, it
> should be a requirement that text/xml (or the preferred application/xml,
> which avoids silly crufty rules about charsets) is always a well formed
> XML instance, and things thatare now well formed XML use a different
> type.

In XML 1.0, an XML document can also become an external parsed entity.  
For example, consider an XML document as below:

<?xml version="1.0"?>
<test/>

This can be used as an external parsed entity from another 
document as blow:

<?xml version="1.0"?>
<!DOCTYPE doc [
<!ENTITY parsedentity SYSTEM "http://hoge">
]>
<doc>&parsedentity;</doc>

which is equivalent to <doc><test/></doc>.

In order to allow such an XML document, we have to use text/xml or application/xml
for external parsed entities.

Dan Connolly wrote:
> 	Four score and seven years ago
> 
> is a valid text/xml body, but an XML processor will burp cuz there's
> no root element.

Yes.  It must report a fatal error.  Even if we disallowed the use of text/xml 
or application/xml for parsed entities, the world would not be free from incorrect 
documents and fatal errors.

Cheers,

Makoto
 
Fuji Xerox Information Systems
 
Tel: +81-44-812-7230   Fax: +81-44-812-7231
E-mail: murata.makoto@fujixerox.co.jp
Received on Monday, 29 November 1999 00:33:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:49 GMT