Attribute Comparison Selectors

I'm working on a timeline project in markup language (HTML currently, 
but I was considering expanding to XML)

I'd like to be able to color code the events.  This can, of course, 
be done with CSS as it is currently, by assigning each era a specific 
value of an attribute (either class or some custom attribute). 
However, it seems like the ideal way to do it would be to have a date 
attribute, (this much can be done in XML)  and have a css selector 
that can do things like ranges.  Currently, selectors only allow for 
checking to see if an attribute exists, if it is a particular string, 
or if it contains (or starts with or ends with) a particular string. 
What I would propose would be a selector for numerical attributes 
only, something like this:

*[attribute|>number|<number]

So, for example, if I were to markup

event[date|>1849|<1914] {background: #00ff00;}

Any event between 1849 and 1914 would have a green background.

Just a thought...  do with it as you see fit.

Received on Friday, 17 March 2006 17:29:45 UTC