Re: Question about linking CSS to XML vocabularies

--- Anne van Kesteren <annevk@opera.com> wrote:

> If an attribute is defined in such a way that it defines classes it would  
> be "of type class". In theory you could have a language Foo based on XML  
> which has the following construct:
> 
>    <foo bar="test  x,test y">
> 
> Which could in theory be matched by Selectors using
> 
>    .test\20\20x.test\20y


That sounds very bad, but indeed section 6.4 of the Selectors working draft currently says:
"UAs may apply selectors using the period (.) notation in XML documents if the UA has
namespace-specific knowledge that allows it to determine which attribute is the "class" attribute
for the respective namespace."

That would require every formulation of XML to specify its own attribute. Doesn't that seem a bit
wasteful? Wouldn't it be better to have a single attribute that all formulations of XML can share?
Isn't that the idea behind xml:id?

I don't see why there shouldn't be an xml:class attribute if there is an xml:id attribute. They
seem to serve similar purposes.

Received on Saturday, 30 December 2006 08:21:20 UTC