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

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 UTC