Subject: Editorial: rules based on MIME media types in @type attributes

From: "Thomas Broyer" <[email-masked]>
Date: Fri, 20 May 2005 09:00:10 +0200 (CEST)

I'd like to raise this up one more time:
http://www.imc.org/atom-syntax/mail-archive/msg14247.html

Atom defines rules based on MIME media types in @type attributes, and I'm
not sure they are actually accurate...
They also don't explain the actual meaning behind the technical rules.

In 4.1.3.2:
[
   If the value of type begins with "text/" or ends with "+xml", the
   content SHOULD be local; that is to say, no "src" attribute should be
   provided.
]

Replace with:
[
   If the value of type is a text or XML media type, that is, if it begins
   with "text/", is one the XML Media Types [XMLMIME] or ends with "+xml",
   the content SHOULD be local; that is to say, no "src" attribute should
   be provided.
]

In 4.1.3.3:
[
   4.  If the value of "type" ends with "+xml" or "/xml"
       (case-insensitive), the content of atom:content MAY include child
       elements, and SHOULD be suitable for handling as the indicated
       media type. [...]
]

Replace with:
[
   4.  If the value of "type" is an XML media type, that is, if it is one
       of the XML Media Types [XMLMIME] or ends with "+xml"
       (case-insensitive), the content of atom:content MAY include child
       elements, and SHOULD be suitable for handling as the indicated
       media type. [...]
]

Note that the above (in 4.1.3.3) uses "(case-insensitive)" while the first
(in 4.1.3.2) doesn't. I didn't fix it but I think someone should.

In 4.1.3.3:
[
   5.  If the value of "type" begins with "text/" (case-insensitive),
       the content of atom:content MUST NOT contain child elements.
]

Replace with:
[
   5.  If the value of "type" is a text media type, that is, if it begins
       with "text/" (case-insensitive), the content of atom:content MUST
       NOT contain child elements.
]

As Julian raised at that time, having to apply the 4.1.3.3 rules in order
is not explicit and thus quite confusing.

[XMLMIME] http://www.ietf.org/rfc/rfc3023.txt

-- 
Thomas Broyer

---

From: Joe Gregorio <[email-masked]>
Date: Fri, 20 May 2005 08:49:34 -0400

>    the content SHOULD be local; that is to say, no "src" attribute should

To be completely accurate, the part before the '/' is called the type, the part
after the '/' is called the sub-type, so to rephrase your re-phrasing:

    If the value of is a text or XML media type, that is, if the type component 
    of the mime-type  is equal to  "text", or if the mime-type is one the 
    XML Media Types [XMLMIME], or the mime-type's sub-type ends with "+xml",
    the content SHOULD be local; that is to say, no "src" attribute should
    be provided.

   -joe

-- 
Joe Gregorio        http://bitworking.org

---

From: "Thomas Broyer" <[email-masked]>
Date: Fri, 20 May 2005 16:34:33 +0200 (CEST)

Joe Gregorio wrote:
> To be completely accurate, the part before the '/' is called the type,
> the part after the '/' is called the sub-type

I know.

I chose not to use these terms to make the wording "lighter" and thus
easier to read and understand.

--
Thomas Broyer

---

From: Tim Bray <[email-masked]>
Date: Fri, 20 May 2005 17:27:27 -0700

>    the content SHOULD be local; that is to say, no "src" attribute 

I believe that Thomas is right and this is an editorial change, because 
as written it wouldn't apply to application/xml.  You could either do 
it Thomas' way or simply rewrite to say "... or ends with either '+xml' 
or '/xml'", either works. -Tim

---

From: Thomas Broyer <[email-masked]>
Date: Sat, 21 May 2005 13:28:53 +0200

Tim Bray wrote:

> I believe that Thomas is right and this is an editorial change, 
> because as written it wouldn't apply to application/xml.  You could 
> either do it Thomas' way or simply rewrite to say "... or ends with 
> either '+xml' or '/xml'", either works. -Tim
>
No, because I think the rules should also match 
application/xml-external-parsed-entity and 
text/xml-external-parsed-entity. This also needs the following to be 
dropped or reworded (maybe just drop the word "normally" in "this would 
normally mean"):
[
      If the "src" attribute is not provided, this would
      normally mean that the "atom:content" element would contain a
      single child element which would serve as the root element of the
      XML document of the indicated type.
]

-- 
Thomas Broyer