[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

MURATA Makoto wrote:
> Chris Lilley wrote:
> > [someone] 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 a good 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.

Of course - that is not the problem. Rather the converse - an external
parsed entity is not necessarily a well formed document.

> For example, consider an XML document as below:
> <?xml version="1.0"?>
> <test/>

Thats fine, I have no issue with that instance being labelled as
text/xml or application/xml. But I do have a problem with this being so

hello world

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

No, that doesn't follow. You are driving a non-commutative relationship
backwards. Just because a well formed XML document can be used as an
external parsed entity (and can be labelled as text/xml or
application/xml), it does not follow that a non-well-formed thing can
also be so labelled. It should be labelled something else, like
application/xml-epe or whatever.

Which would then mean that valid MIME types for an epe would be
application/xml-epe or application/xml depending on whether the epe was
a well-formed document init own right, or not.

> 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.

It is one thing for such errors to occur through mistakes. It is another
to encourage or mandate such errors, through labelling things