Abstract
Allow an introspection document to indicate 'what' can go into a collection.
Status
Open
Rationale
http://www.imc.org/atom-protocol/mail-archive/msg01245.html
http://www.imc.org/atom-protocol/mail-archive/msg01278.html
Proposal
Update Section 3 with the following
Language-Sensitive - Any element defined by this specification MAY have an xml:lang attribute,
whose content indicates the natural language for the element and its descendents.
The language context is only significant for elements and attributes declared to be
"Language-Sensitive" by this specification. Requirements regarding the
content and interpretation of xml:lang are specified in
<a href="#W3C.REC-xml-20040204">XML 1.0</a> [W3C.REC-xml-20040204], Section 2.12.
Replace Section 8.1.1.3 with the following:
The 'app:collection' element describes collections and their member resources.
atomContentList = comma separated list ("text", "xhtml", "html",
media-range, atomUri, atomNCName)
atomMediaTypeList = comma separated list (media-range)
appEntriesCollection = element app:collection {
attribute title { text }?,
attribute type { "entries" },
attribute content { atomContentList }?,
attribute href { text }?,
member *
}
appGenericCollection = element app:collection {
attribute title { text }?,
attribute type { "generic" },
attribute mediatype { atomMediaTypeList }
attribute href { text }?,
member *
}
8.1.1.3.1 The 'title' Attribute
The "title" attribute conveys human-readable information about the
collection. The content of the "title" attribute is Language-Sensitive.
app:collection elements MUST have a "title" attribute.
8.1.1.3.2 The 'type' Attribute
app:collection elements MAY contain a 'type' attribute. If it is not present,
it's value is considered to be 'generic'. A value of 'entries' for the 'type'
attribute indicates that the Collection is an Entry Collection. A value of
'generic' indicates that the Collection is a Generic Collection.
8.1.1.3.3 The 'content' Attribute
atom:collection elements MAY have a "content" attribute if the 'type' attribute has a
value of 'entries'. The 'content' attribute indicates the types of content that
are allowed in the Collection. That is, the value of the content attribute
is used to restrict the form of the entries in the Collection.
If the 'content' attribute is not present the Collection must be interpreted
as if the 'content' attribute had a value of 'text, html, xhtml'.
The value of "content" MUST be a string that is non-empty and matches
the "atomContentList" production. Note that use of a relative reference other
than a simple name is not allowed. If a name is given, implementations MUST
consider the Collection type to be equivalent to the same name registered
within the IANA Registry of Collection Types, and thus the IRI that would
be obtained by appending the value of the "content" attribute to the string
"http://www.iana.org/XXX". When more than one value is given in the list, every
entry in the Collection MUST conform to at least one of the entry collection types.
Entries MAY conform to more than one of the given entry collection types.
This document defines three initial values for the Registry of Entry Collection Types:
1. The value "text" signifies that entries MUST have "content" elements
whose 'type' attribute has a value of 'text'.
2. The value "html" signifies that entries MUST have "content" elements
whose 'type' attribute has a value of 'html'.
3. The value "xhtml" signifies that entries MUST have "content" elements
whose 'type' attribute has a value of 'xhtml'.
Absolute IRIs may also appear in the "content" list. The absolute IRI indicates
a type of entry that is not registered.
8.1.1.3.4 The 'mediatype' Attribute
atom:collection elements MAY have a "mediatype" attribute if the 'type'
attribute has a value of 'generic'. The value of the 'mediatype' attribute
is a comma separated list of media ranges, as media-range is defined by
RFC 2616. These media ranges define the mime-types that the Collection
can contain. Any member of a Generic Collection MUST match one of the
media-ranges listed in the "mediatype" attribute.
For example,
mediatype="image/*"
Should be interpreted that any image type, such as image/png, could
be found in such a Collection. It should also be interpreted that
a resource with a mime-type of "text/xml" would not be found
in such a Collection.
Another example
mediatype="application/pdf, video/quicktime"
Should be interpreted as supporting both pdf and quicktime mime-types,
but no others.
If the "mediatype" attribute is not given then the Collection should
be understood to accept any mime-type, that is, as if the "mediatype"
attribute were supplied with a value of "*/*".
8.1.1.3.5 The 'href' Attribute
The "href" attribute contains the IRI of the Collection. app:collection
elements MUST have a href attribute, whose value MUST be a IRI reference [RFC3987].
Add this to Section 11 IANA Considerations
11.1 Registry of Entry Collection Types
This registry is maintained by IANA and initially contains three
values: "text", "html", and "xhtml". New assignments are subject to
IESG Approval, as outlined in [RFC2434]. Requests should be made by email to
IANA, which will then forward the request to the IESG requesting approval.
The request should use the following template:
* Attribute Value: ( A value for the "content" attribute that conforms to the syntax rule given in Section 8.1.1.3 )
* Description:
* Security considerations:
