Subject: Re: External parsed entities (Re: Inconsistency between IETF and W3C...)
From: MURATA Makoto <[email-masked]>
To: James Clark <[email-masked]>
Cc: [email-masked]
Date: Wed, 08 Dec 1999 17:09:48 +0900
List-Id: <ietf-xml-mime.imc.org>

James Clark wrote:
> 
> The Syntax WG decided that wasn't well-formed. (Fix to E71.)

#I changed the cc field.  Since I am not sure if James is on this ML, 
#I am responding directly.

So, can any external parameter entity be used as an external DTD subset 
and vice versa?

Makoto
 
Fuji Xerox Information Systems
 
Tel: +81-44-812-7230   Fax: +81-44-812-7231
E-mail: [email-masked]

Date: Mon, 06 Dec 1999 16:48:48 +0700
From: James Clark <[email-masked]>
To: MURATA Makoto <[email-masked]>
CC: [email-masked], Dan Connolly <[email-masked]>, [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: External parsed entities (Re: Inconsistency between IETF and W3C...)
Sender: [email-masked]

MURATA Makoto wrote:
> 
> MURATA Makoto wrote:
> > As for external PARAMETER entities, they always parse as external DTD subsets.
> > I now think that we do not need a specialized media type for external parameter
> > entites.
> 
> Having read the XML specification and errara carefully, I withdraw my
> claim.  An external PARAMETER entity does *not* always parse as an external
> DTD subset.
> 
> For example, the following XML document is valid.
> 
> foo.xml
> 
> <?xml version="1.0"?>
> <!DOCTYPE foo SYSTEM "foo.dtd">
> <foo/>
> 
> foo.dtd
> 
> <!ENTITY % foope SYSTEM "foope.mod">
> <!ELEMENT foo %foope;>
> 
> foope.mod
> 
> EMPTY

The Syntax WG decided that wasn't well-formed. (Fix to E71.)

James

From: MURATA Makoto <[email-masked]>
Date: Tue, 07 Dec 1999 14:09:14 +0900
To: [email-masked], [email-masked]
Cc: Dan Connolly <[email-masked]>, [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: External parsed entities (Re: Inconsistency between IETF and W3C...)
Sender: [email-masked]

MURATA Makoto wrote:
> Having read the XML specification and errara carefully, I withdraw my 
> claim.  An external PARAMETER entity does *not* always parse as an external 
> DTD subset.

After reading relevant mail again, I must confess I do not understand.  
Forgive my stupidity.  Parameter entities are just hard ...

I will try to solve this issue in the XML Core WG.

Makoto
 
Fuji Xerox Information Systems
 
Tel: +81-44-812-7230   Fax: +81-44-812-7231
E-mail: [email-masked]

From: MURATA Makoto <[email-masked]>
Date: Mon, 06 Dec 1999 18:05:20 +0900
To: [email-masked]
Cc: [email-masked], Dan Connolly <[email-masked]>, [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: External parsed entities (Re: Inconsistency between IETF and W3C...)
Sender: [email-masked]

MURATA Makoto wrote:
> As for external PARAMETER entities, they always parse as external DTD subsets.  
> I now think that we do not need a specialized media type for external parameter 
> entites.

Having read the XML specification and errara carefully, I withdraw my 
claim.  An external PARAMETER entity does *not* always parse as an external 
DTD subset.

For example, the following XML document is valid.

foo.xml

<?xml version="1.0"?>
<!DOCTYPE foo SYSTEM "foo.dtd">
<foo/>

foo.dtd

<!ENTITY % foope SYSTEM "foope.mod">
<!ELEMENT foo %foope;>

foope.mod

EMPTY

Makoto
 
Fuji Xerox Information Systems
 
Tel: +81-44-812-7230   Fax: +81-44-812-7231
E-mail: [email-masked]

From: MURATA Makoto <[email-masked]>
Date: Mon, 06 Dec 1999 10:28:39 +0900
To: [email-masked]
Cc: Dan Connolly <[email-masked]>, [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: External parsed entities (Re: Inconsistency between IETF and W3C...)
Sender: [email-masked]

Chris Lilley wrote:
> Instead, they should be labelled as what?

application/xml-dtd

Makoto
 
Fuji Xerox Information Systems
 
Tel: +81-44-812-7230   Fax: +81-44-812-7231
E-mail: [email-masked]

Date: Fri, 03 Dec 1999 15:39:44 +0100
From: Chris Lilley <[email-masked]>
Organization: W3C
To: MURATA Makoto <[email-masked]>
CC: [email-masked], Dan Connolly <[email-masked]>, [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: External parsed entities (Re: Inconsistency between IETF and W3C...)
Sender: [email-masked]

MURATA Makoto wrote:
> 
> Chris Lilley wrote:
> > Yes. Even more, though, I care about the converse case; in the case of
> > applications/xml, it should always be the case that it is xml. If it is
> > not, then it is an error, rather than being "a little used case which is
> > actually legal but we dodn't expect people to use it directly".
> 
> We cannot guarantee that the MIME body is really XML since errors will happen.

Sure - but when they hzappen, they should be *errors*. Not, something
that is supposed to happen sometimes.

> But we can elminate the possibility that correctly-labelled data cause
> fatal errors.

Yes, exactly.

> Having heard your argument, I am inclined to introduce a media type
> for external parsed entities. 

Thanks. I am glad that we now agree.

> How do other people feel?
> 
> As for external PARAMETER entities, they always parse as external DTD subsets.
> I now think that we do not need a specialized media type for external parameter
> entites.

Instead, they should be labelled as what?

--
Chris

From: MURATA Makoto <[email-masked]>
Date: Fri, 03 Dec 1999 20:29:45 +0900
To: [email-masked]
Cc: Dan Connolly <[email-masked]>, [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: External parsed entities (Re: Inconsistency between IETF and W3C...)
Sender: [email-masked]

Chris Lilley wrote:

> Ok, so even allowing that, if "which program" is an XML parser and you
> feed it a non well formed document, what happens? I would regard
> "mandatory fatal error" as being synonymous with "can't read the
> document"

Right.  But even if the content type is text/xml-external-parsed-entity, 
I cannot read it.  I have no programs that can handle external parsed 
entities directly.  But such programs may be developed tomorrow.

> Yes. Even more, though, I care about the converse case; in the case of
> applications/xml, it should always be the case that it is xml. If it is
> not, then it is an error, rather than being "a little used case which is
> actually legal but we dodn't expect people to use it directly".

We cannot guarantee that the MIME body is really XML since errors will happen.  
But we can elminate the possibility that correctly-labelled data cause 
fatal errors.

> > If some programs that can handle external parsed entities directly (i.e.,
> > without using XML processors for XML documents that reference to them),
> > your point perfectly makes sense. 
> 
> Your point seems to ignore resource discovery, indexing, and other
> routes to finding resources that may not have been intended to be found,
> or found first, or found before other documents in whose context they
> were intended to be used.

I do not ignore such discorvery.  My point is that even if it is lablled as 
an external parsed entity, no existing programs can parse it anyway.  But 
this may change.

Having heard your argument, I am inclined to introduce a media type 
for external parsed entities.  How do other people feel?

As for external PARAMETER entities, they always parse as external DTD subsets.  
I now think that we do not need a specialized media type for external parameter 
entites.

Cheers,

Makoto
 
Fuji Xerox Information Systems
 
Tel: +81-44-812-7230   Fax: +81-44-812-7231
E-mail: [email-masked]

Date: Fri, 03 Dec 1999 11:59:55 +0100
From: Chris Lilley <[email-masked]>
Organization: W3C
To: MURATA Makoto <[email-masked]>
CC: [email-masked], Dan Connolly <[email-masked]>, [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: External parsed entities (Re: Inconsistency between IETF and W3C...)
Sender: [email-masked]

MURATA Makoto wrote:
> 
> Chris Lilley wrote:
> > Yes. My concern is that the question "is this thing, returned as
> > application/xml, actually xml or not" should *not* have multiple
> > answers.
> 
> In general, MIME types can never provide all information about the
> content.  You have to read the MIME body.  The MIME type only tells
> you which program can read the MIME body.

Ok, so even allowing that, if "which program" is an XML parser and you
feed it a non well formed document, what happens? I would regard
"mandatory fatal error" as being synonymous with "can't read the
document"

> In the case of external parsed entities, your point is that application/xml
> or text/xml do not provide enough information, since XML processors cannot
> handle external parsed entities directly.

Sort of.

>  You would lilke the MIME header to
> say "I do not parse as an XML document, but don't throw me away.  I parse as
> an external parsed entity."

Yes. Even more, though, I care about the converse case; in the case of
applications/xml, it should always be the case that it is xml. If it is
not, then it is an error, rather than being "a little used case which is
actually legal but we dodn't expect people to use it directly".

> 
> If some programs that can handle external parsed entities directly (i.e.,
> without using XML processors for XML documents that reference to them),
> your point perfectly makes sense. 

Your point seems to ignore resource discovery, indexing, and other
routes to finding resources that may not have been intended to be found,
or found first, or found before other documents in whose context they
were intended to be used.

> 
> Cheers,
> 
> Makoto
> 
> Fuji Xerox Information Systems
> 
> Tel: +81-44-812-7230   Fax: +81-44-812-7231
> E-mail: [email-masked]

From: MURATA Makoto <[email-masked]>
Date: Fri, 03 Dec 1999 14:47:53 +0900
To: [email-masked]
Cc: Dan Connolly <[email-masked]>, [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: External parsed entities (Re: Inconsistency between IETF and W3C...)
Sender: [email-masked]

Chris Lilley wrote:
> Yes. My concern is that the question "is this thing, returned as
> application/xml, actually xml or not" should *not* have multiple
> answers.

In general, MIME types can never provide all information about the 
content.  You have to read the MIME body.  The MIME type only tells 
you which program can read the MIME body.

In the case of external parsed entities, your point is that application/xml 
or text/xml do not provide enough information, since XML processors cannot 
handle external parsed entities directly.  You would lilke the MIME header to 
say "I do not parse as an XML document, but don't throw me away.  I parse as 
an external parsed entity."

If some programs that can handle external parsed entities directly (i.e., 
without using XML processors for XML documents that reference to them), 
your point perfectly makes sense.  Are there such programs?  
Do people in this ML have such programs?

Cheers,

Makoto
 
Fuji Xerox Information Systems
 
Tel: +81-44-812-7230   Fax: +81-44-812-7231
E-mail: [email-masked]

Date: Wed, 01 Dec 1999 18:36:45 +0100
From: Chris Lilley <[email-masked]>
Organization: W3C
To: Larry Masinter <[email-masked]>
CC: MURATA Makoto <[email-masked]>, Dan Connolly <[email-masked]>, [email-masked], [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: External parsed entities (Re: Inconsistency between IETF and W3C...)
Sender: [email-masked]

Larry Masinter wrote:

> The point is that the general question of "this message body, which
> MIME type should I use" can always have multiple answers (since
> application/octet-stream usually applies, for example).

Yes. My concern is that the question "is this thing, returned as
application/xml, actually xml or not" should *not* have multiple
answers.

--
Chris

From: "Larry Masinter" <[email-masked]>
To: "Chris Lilley" <[email-masked]>, "MURATA Makoto" <[email-masked]>
Cc: "Dan Connolly" <[email-masked]>, <[email-masked]>, <[email-masked]>, <[email-masked]>, <[email-masked]>, <[email-masked]>
Subject: RE: External parsed entities (Re: Inconsistency between IETF and W3C...)
Date: Wed, 1 Dec 1999 08:22:14 PST
Importance: Normal
Sender: [email-masked]

Chris Lilley wrote:
> > > a) application/xml for xml files. All are required to be well 
> formed,as
> > > per the XML specification, otherwise it is a fatal error.
> > > b) application/xml-epe for external parsed entities which are not
> > > themselves well-formed instances

MURATA Makoto replied:

> > Point of clarification.   I have an external parsed entity.  I use
> > it only as an external parsed entity.  Incidentally, it also parses
> > as an XML document, but this was never intended.  Which one should
> > I use?

Chris Lilley wrote:

> The algorithm is as follows:
> 
> Is it well formed instance
>   Yes: use a)
>   No: use b)

This is not an appropriate algorithm. The choice of the MIME type
to use for a communication depends on the intent of the communication
as well as the nature of the body of the communication. It might
be appropriate to use text/plain, for example, if you intend for
the recipient to read the actual XML rather than interpret it,
and it might be appropriate to use application/octet-stream if you
want no interpretation at all.

The point is that the general question of "this message body, which
MIME type should I use" can always have multiple answers (since
application/octet-stream usually applies, for example).

The XHTML group got caught up in this, since there are some XHTML
bodies for which 'text/html' are appropriate and others that are not.
Don't try to construct a functional one-to-one mapping from 
message body content to MIME type, because you can and will get
multiple values.

Date: Wed, 01 Dec 1999 11:51:32 +0100
From: Chris Lilley <[email-masked]>
Organization: W3C
To: MURATA Makoto <[email-masked]>
CC: Dan Connolly <[email-masked]>, [email-masked], [email-masked], [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: External parsed entities (Re: Inconsistency between IETF and W3C...)
Sender: [email-masked]

MURATA Makoto wrote:
> 
> Chris Lilley wrote:
> > a) application/xml for xml files. All are required to be well formed,as
> > per the XML specification, otherwise it is a fatal error.
> > b) application/xml-epe for external parsed entities which are not
> > themselves well-formed instances
> 
> Point of clarification.   I have an external parsed entity.  I use
> it only as an external parsed entity.  Incidentally, it also parses
> as an XML document, but this was never intended.  Which one should
> I use?

The algorithm is as follows:

Is it well formed instance
  Yes: use a)
  No: use b)

This does not strike me as being especially difficult or complex.

--
Chris