[Microformats-dev] in progress draft of hcard-parsing

Ryan King ryan at technorati.com
Mon Aug 8 12:01:05 PDT 2005

On Aug 8, 2005, at 11:26 AM, Bud Gibson wrote:

> My observation is that the CSS selector method is not quite up to  
> the task.  For instance, you cannot use CSS selectors to select  
> reltag (CSS selectors do not select on the rel attribute).

Um, yes they do. For example, I use this on my blog to put *'s after  
rel=met links:

a[rel~="met"]:after { content:"*" }

[see the last line of http://theryanking.com/blog/wp-content/themes/ 

So, for rel tag you'd use


to select it.

> DOM selectors, however, will do the trick, and there are a number  
> of implementations for them including XPath and ECMA script's DOM  
> specification.
> There are issues with DOM-based methods, in particular a flattening  
> of the DOM tree that occurs in some implementations.  There are  
> real cases where this can hurt you, but I will make those the  
> subject of another post.

Of course this methods will all work, but CSS selectors seem to but  
much more closely related to the markup, which, for me, makes them an  
easier interface.


> Bud
> On Aug 8, 2005, at 13:46, Ryan King wrote:
>> My favorite part about this technique is that it uses CSS  
>> selectors to extract data from the (X)HTML page.
>> /me goes to see what languages have CSS selector support
>> Unfortunately, it appears that not many languages have support for  
>> using CSS selectors to extract content. The only real example I've  
>> seen is this:
>> http://ripcord.co.nz/behaviour/
>> Which uses CSS selectors in javascript to apply behaviors (which,  
>> IMNSHO, is awesome).
>> Does anyone know of CSS selector implementations in any other  
>> languages? (besides in-browser support)
>> -ryan
> _______________________________________________
> microformats-dev mailing list
> microformats-dev at microformats.org
> http:

More information about the microformats-dev mailing list