[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Categories and fixed="yes"
On 29/11/07 10:50 AM, "Brian Smith" <brian@xxxxxxxxxxxxxx> wrote:
>> <category term="Programming" label="Programming" /> <category
>> term="Programming/C#" label="C#" />
>
> When you create a new category "Animals -> Cats", how do you know how to
> format the term attribute into "Animals/Dogs" and not "Animals -> Dogs"
> or somethng else? And, similarly, how do you know that you should
> produce a tree by splitting at "/"? And, what about "Programming ->
> I/O"?
blech. Lots of different ways micro-parsing could go wrong. How about
codifying the broader term relationship in XML, via an extension...
<category term="Programming" label="Programming" />
<category term="C#" label="C#" x:BT="Programming" />
<category term="I/O" label="I/O" x:BT="Programming" />
If your processor doesn't understand x:BT then you are no worse off than if
your processor can't safely guess hierarchy from the @term values.
You could also use a belt+suspenders approach:
<category term="Programming" label="Programming" />
<category term="Programming -> C#" label="C#" x:BT="Programming" />
<category term="Programming -> I/O" label="I/O" x:BT="Programming" />
.. which helps if you also have an interest in music:
<category term="Programming" label="Programming" />
<category term="Programming -> C#" label="C#" x:BT="Programming" />
<category term="Programming -> I/O" label="I/O" x:BT="Programming" />
<category term="Music" label="Music" />
<category term="Music -> C#" label="C#" x:BT="Music" />
There's already many choices out there of XML vocabs which have an x:BT
concept defined. Some might have the extension as a child element of the
<atom:category/>, others implement it as an attribute.
e.