Subject: Category URI's

From: James M Snell <[email-masked]>
Date: Mon, 09 Jan 2006 13:12:51 -0800

I'm in the process of going through a number of application scenarios 
with Atom and I'm coming up with a problem because I cannot associate a 
URI with a <category> element.

This is mainly coming up in the context of tagging.  I want to be able 
to specify a tag and a URI that can be used to request a list of other 
items associated with that tag.

What I want is:

<category scheme="..."
           term="..."
           href="..." />

What I end up having to do is:

<category scheme="http://.../tag"
           term="foo" />
<link rel="http://.../tag"
       title='foo"
       href=".../?tag=foo" />

Having an href attribute on the Category element strikes me as an 
obviously useful thing that we need to make sure gets into a future 
update of the specification.

- James

---

From: "A. Pagaltzis" <[email-masked]>
Date: Mon, 9 Jan 2006 22:33:37 +0100

Hi James,

><link rel="http://.../tag"

you don’t spell your examples out sufficiently to decode them,
but what you want sounds to me like you should be doing this or
a variation thereof:

    <category
        scheme="http://.../tag"
        term="?tag=foo"
        label="foo"
    />

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

---

From: James M Snell <[email-masked]>
Date: Mon, 09 Jan 2006 13:43:51 -0800

This makes sense but seems to assume using a scheme+term construction 
for building a URI, which makes sense in practical impl terms but is not 
codified in the standard.  The scheme attribute is just an identifier. 
There is currently no normative means of associating or constructing a 
URI from a category element.  Doing so should not be a requirement but 
it should be an option.

---

From: Graham Parks <[email-masked]>
Date: Mon, 9 Jan 2006 22:28:53 +0000

>         label="foo"

Blurgh.

Graham

---

From: Tim Bray <[email-masked]>
Date: Mon, 09 Jan 2006 15:52:58 -0800

On Jan 9, 2006, at 1:12 PM, James M Snell wrote:

> I'm in the process of going through a number of application  
> scenarios with Atom and I'm coming up with a problem because I  
> cannot associate a URI with a <category> element.

 From my Atom feed:

<category scheme='http://www.tbray.org/ongoing/What/'  
term='Technology/XML' />

The scheme is identified by a URI. -Tim

---

From: Bill de hÓra <[email-masked]>
Date: Mon, 09 Jan 2006 23:47:06 +0000

> On 9 Jan 2006, at 9:33 pm, A. Pagaltzis wrote:

    <category
        term="http://example.org/cat/foo"
        label="foo"
    />

cheers
Bill

---

From: "A.Pagaltzis" <[email-masked]>
Date: Tue, 10 Jan 2006 01:16:06 +0100

>        term="http://example.org/cat/foo"

Good point.

    <category
        scheme="http://example.org/tag"
        term="http://example.org/?tag=foo"
        label="foo"
    />

Regards,

---

From: James M Snell <[email-masked]>
Date: Mon, 09 Jan 2006 16:43:36 -0800

Sorry, I wasn't clear, what I need is to associate a dereferenceable URI 
  with a category without requiring the client to construct one (e.g. by 
combining the scheme+term.  The approach Bill suggested should work for 
what I need.  I still think an href attribute may be useful in the 
future but, we'll see.

Tim Bray wrote:
>> with Atom and I'm coming up with a problem because I cannot associate 
>> a URI with a <category> element.
> 
>  From my Atom feed:
>

---

From: James M Snell <[email-masked]>
Date: Mon, 09 Jan 2006 16:40:46 -0800

Yeah, that would work.  However, whether or not to interpret the term as 
a dereferenceable url still comes down to an implementation detail. 
e.g. Terms associated with xyz scheme should always be interpreted as 
dereferenceable URI's.

So i could say...

<category scheme="http://ibm.com/tag"
           term="http://example.org/mylist?tag=foo"
           label="foo" />

This should work for what I need.

Thanks for the responses.

- James

---

From: "James Holderness" <[email-masked]>
Date: Tue, 10 Jan 2006 00:54:03 -0000

James M Snell wrote:
> This is mainly coming up in the context of tagging.  I want to be able to 
> specify a tag and a URI that can be used to request a list of other items 
> associated with that tag.
>
> obviously useful thing that we need to make sure gets into a future update 
> of the specification.

You've got to be kidding. Worst case you stick a couple of related link 
elements at the top of your feed for category specific feeds. Better would 
be to toss them on your webpage somewhere where a user might actually see 
them. An extra attribute in every category of every element which nobody is 
ever going to see strikes me as insane.

The category element has some major problems, but this isn't one of them.

Regards
James