W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > February 2009

Re: RDFa and Web Directions North 2009

From: Ivan Herman <ivan@w3.org>
Date: Mon, 16 Feb 2009 14:04:37 +0100
Message-ID: <49996465.5060005@w3.org>
To: Henri Sivonen <hsivonen@iki.fi>
CC: Karl Dubost <karl@la-grange.net>, Mark Birbeck <mark.birbeck@webbackplane.com>, Sam Ruby <rubys@intertwingly.net>, Kingsley Idehen <kidehen@openlinksw.com>, Dan Brickley <danbri@danbri.org>, Michael Bolger <michael@michaelbolger.net>, public-rdfa@w3.org, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>, Tim Berners-Lee <timbl@w3.org>, Dan Connolly <connolly@w3.org>, Ian Hickson <ian@hixie.ch>


Henri Sivonen wrote:
> 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.

Ah, o.k., I misunderstood what you said. Sorry.

> 
> 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.
> 

Indeed. However, the core of the Python package is oblivious to the
content type and considers the source code (whether it is xml or not)
only. The accept header becomes relevant only if the package is used via
HTTP, which is not necessarily the case (I use the same code off line on
my machine as a command line tool, for example). Ie, adapting that to
any other strategies v.a.v. the accept header is a minor and easy job to
do, and hence, I believe, a secondary issue in this discussion for now.

Thanks

Ivan

-- 

Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf


Received on Monday, 16 February 2009 13:16:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 16 February 2009 13:16:47 GMT