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

RE: Categories and fixed="yes"



That actually sounds pretty reasonable to me, at first glance.

One way to tackle the WordPress-style hierarchical categories
(and any other exotic schemes that might come up) could be to
recommend that when adding a category to an entry, include
all of the foreign attributes (and content?) in that category
element.

Although actually, in the particular case of hierarchy, you
could just have the term reflect the hierarchy and the label
only have the category name. For example:

<category term="Programming" label="Programming" />
<category term="Programming/C#" label="C#" />

Still, I like the idea of preserving foreign attributes and
content for category elements.

-----Original Message-----
From: Brian Smith [mailto:brian@xxxxxxxxxxxxxx]
Sent: Wednesday, November 28, 2007 3:07 PM
To: Joe Cheng
Cc: 'atom-protocol'
Subject: RE: Categories and fixed="yes"

Joe Cheng wrote:
> There's the notion of categories that almost every blogging
> platform supports (I've taken to calling these
> "blog-categories" to distinguish them from the too-generic
> concept used in Atom). And there's also tags, which are
> almost the same thing. I'm not sure the lines between the two
> terms are hard and fast; if anyone can educate me, please do.

I think the distinction comes into play primarily in the UI. Tags are
usually picked chosen by the user simply by typing a bunch of them into
an edit control. Categories are usually chosen from a list or tree
control.

> If there are going to be multiple "schemes" (and you might
> consider categories and tags to be two different schemes)
> then there needs to be a way to provide a human-readable
> label for each scheme.

Movable Type has "categories" like WordPress, "tags" like WordPress, and
"keywords" which are just like tags but different. If I was a Movable
Type that cared about the distinction between "tags" and "keywords" then
I would want a separate field for each one.

> Given these requirements, can and should the solution be
> based on the categories currently defined in RFC5023?
> Might one approach be to try to come up with a blank-slate
> solution, and once we know exactly what that looks like, see
> whether it can be implemented using <categories> without
> losing too much?

I will punt on trying to suggest a protocol for manipulating
WordPress-like hierarchical categories. Every other kind of scheme seems
to boil down to:

(a) What should I label the scheme in the UI?
(b) What are the minimum and maximum number of terms in the scheme that
I can attach to a single entry?
(c) Can I add new terms to the scheme implicitly (by including them in
new or updated entries)?
(d) If the client can only support one scheme, which scheme should it
prefer?

I suggest leaving the <categories> element as-is, and defining a new
scheme element that looks like this:

<scheme><atom:id>http://example.org/whatever/parent/child</atom:id></ato
m:id>
        <atom:title>Category</atom:title>
        <new-terms>implicit</new-terms>
        <terms-per-entry min='0' max='1'/>
</scheme>

The "atom:id" element gives the scheme a unique identifier, so that
<app:category> elements can refer it using their "scheme" attributes.

The "atom:title" element is the natural language label for the term.
(Using a text construct allows for BIDI and ruby annotations.)

If there is a "new-terms" element with the value "implicit", then new
terms can be added to the scheme implicitly when entries are POSTed or
PUT. Otherwise, clients should use some other mechanism to add terms to
the scheme before posting, or disallow new terms if it doesn't know of
an appropriate mechanism to use.

The "terms-per-entry" element defines how many terms from the scheme may
appear in  each entry. By default, there are no minimum or maximum. In
practice, min will usually be zero or one and max will 1 or omitted.

WordPress's tags and Movable Type's tags would look like this:

    <scheme><atom:id>http://foo.example.org</atom:id>
            <atom:title>Tags</atom:title>
            <new-terms>implicit</new-terms>
    </scheme>

Movable Type's keywords would look like this:

    <scheme><atom:id>http://foo.example.org</atom:id>
            <atom:title>Keywords</atom:title>
            <new-terms>implicit</new-terms>
    </scheme>

Google's Labels would look like this:

    <scheme><atom:id>http://foo.example.org</atom:id>
            <atom:title>Labels</atom:title>
            <new-terms>implicit</new-terms>
    </scheme>

Live Space's Categories would look like this:

    <scheme><atom:id>http://foo.example.org</atom:id>
            <atom:title>Category</atom:title>
            <terms-per-entry max='1'/>
            <new-terms>implicit</new-terms>
    </scheme>

- Brian