Re: RDFa and Web Directions North 2009

On Feb 16, 2009, at 14:29, Ivan Herman wrote:

> Henri Sivonen wrote:
>>>
>>> * a list of current implementations
>>> http://rdfa.info/rdfa-implementations/
>> Quoting that page:
>>> Python
>>>
>>>    * RDFa Distiller
>>>      Author: Ivan Herman
>>>      http://www.w3.org/2007/08/pyRdfa/
>>
>> This implementation uses a tree representation that leaks qnames to  
>> the
>> application layer even in XML. Thus, it doesn't demonstrate the  
>> problems
>> that apply to SAX and XOM.
>>
>> (Aside: The way the parser is chosen is non-conforming per HTML 5.)
>>
>
> Aside: do you have a pointer to a conforming HTML 5 parser that can  
> also
> be used with Python?

html5lib itself is fine.

However, (by inspection of source) pyRdfa seems to parse input as XML  
regardless of HTTP Content-Type and falls back to html5lib if the XML  
parser raises an exception.

The HTML 5-compliant way is to use the XML parser for application/xhtml 
+xml (without html5lib fallback) and html5lib for text/html.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Monday, 16 February 2009 12:47:33 UTC