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

Re: Announcement of an I-D

Chris Lilley wrote:
> "Simon St.Laurent" wrote:
> > I don't think xml- is introduced as a general convention for anything.
> > xml-dtd can be the form for XML DTD information in large part because DTD
> > files are not themselves well-formed XML documents.
> Agreed. Could the same type be used for other "parts of xml" which are
> not by themselves well-formed xml documents? I am thinking of external
> parsed entities.

Which media type should we use for external parsed entities?  This is an 
interesting exercise.  There are two cases.  

Case 1: an external parsed entity is also a standalone XML document.  

For example, 

<?xml version="1.0" encoding="utf-8"?>

is a standalone XML document, but can be referenced as an external 
parsed entity.  For example, 

<?xml version="1.0"?>
<!DOCTYPE test [
<!ELEMENT test (#PCDATA|dmy)*>
<!ENTITY ent SYSTEM "./url-for-the-parsed-entity">

For such external parsed entities, text/xml or application/xml works perfectly 

Case 2: An external parsed entity is not a standalone XML document.

There are two subcases.  The first subcase is that the client side is expecting 
an external parsed entity.  The second subcase is that the client side has 
no information in advance.

Subcase 1:

The client needs the charset parameter only.  The media type is not useful, 
since the client already knows that the MIME entity is an XML parsed entity.  
Thus, text/xml or application/xml works.

Subcase 2:

If the media type is text/xml or application/xml, the MIME client would probably 
invoke an XML processor, and get a fatal error.  Is this a problem?  I think 
that it is OK.  After all, the client cannot do anything useful, since 
the external parsed entity does not parse as an XML document.


Fuji Xerox Information Systems
Tel: +81-44-812-7230   Fax: +81-44-812-7231
E-mail: murata.makoto@xxxxxxxxxxxxxxx