On Tuesday, November 9, 2004, at 12:54 PM, Zhang Yining wrote:
==== 5.13 The "atom:category" element ====

A Category Construct identifying a category to which the entry is
associated.  atom:entry elements MAY contain
any number of atom:category elements.


Does the absence of category construct for entry imply the category of the entry defaults to that of the feed? I guess not. Need to clarify this bit.

My first reaction is that entry/category would need to override feed/category to avoid weirdness when an off-topic entry gets posted. If there's an entry/category, override, otherwise inherit. That could lead to duplication though, if, for example, the feed/category was "programming" and the entry wanted to be about both "programming" and "linux". Perhaps that would be the uglier situation (more common?). So maybe inherit always, and entry/category adds to the category list. Hmm.


== Notes ==

Example:
<category scheme="http://dmoz.org"; term="/Arts/Animation/" label="Animation" />


Do we allow multiple category construct with the same (scheme, term) but different labels? In following example, the second label is the Chinese translation for "Animation".

<entry>
<category scheme="http://dmoz.org"; term="/Arts/Animation/" label="Animation" />
<category scheme="http://dmoz.org"; term="/Arts/Animation/" label="å ç" />
</entry>


If <category> is a Text Construct (with a few additional attributes), xml:lang would serve well:

<entry>
<category scheme="http://dmoz.org"; term="/Arts/Animation/">Animation</category>
<category scheme="http://dmoz.org"; term="/Arts/Animation/" type="HTML">&lt;blink&gt;Animation &lt;/blink&gt;</category>
<category scheme="http://dmoz.org"; term="/Arts/Animation/" xml:lang="zh">å ç</category>
</entry>


(NOTE: xml:lang omitted from the first two, assuming that's the default language for the feed).

Otherwise, we might go with this:

<entry>
   <category scheme="http://dmoz.org"; term="/Arts/Animation/">
      <label>Animation</label>
      <label type="HTML">&lt;blink&gt;Animation &lt;/blink&gt;</label>
      <label xml:lang="zh">å ç</label>
   </category>
</entry>

...which is shorter when you want multiple labels, but longer otherwise.



Reply via email to