- From: Ivan Herman <ivan@w3.org>
- Date: Fri, 19 Feb 2010 14:05:54 +0100
- To: W3C RDFa WG <public-rdfa-wg@w3.org>
- Message-ID: <4B7E8CB2.5010602@w3.org>
Well, Toby was quicker and he did beat me this morning...:-) But, well... I installed a "shadow" version of the RDFa distiller[1] that relies on an updated pyRdfa code. My goal use this to test/implement some ideas that we discus with of course, here and there, a skew of my own when the ideas are not yet fully crystallized...;-) I concentrated on some issues and discussions we had in the past few months on making the definitions of namespaces and predefined values (a.k.a. 'keywords') easier (this seems to be the most crucial issue in RDFa usage and acceptance). This code includes the following features: - If a CURIE cannot be interpreted as one, ie, no prefix is defined, then it is considered as a pure URI. As a consequence, URI-s can then be used directly in, eg, @rel or @resource, interchangeably with CURIE-s. (There is a bug danger, though, with users forgetting a prefix declaration, hence generating funny URI-s; a warning is added to the generated triple set if an unusual URI scheme is detected in the process) - I implemented Manu's write up of the vocabulary definition[2], but with one restriction and one extension: - The vocabulary file that is indicated in @vocab must be RDFa (ie, no RDF/XML or turtle). - The same file can also include namespace declarations, ie, triples of the form <uri> <http://www.w3.org/2010/vocabs/rdfa#prefix> "prefix" that behave as if an xmlns:prefix="uri" has been defined in the original code. (I believe the first restriction should be kept in general to simplify the implementations who should not be forced to include all kinds of other parsers; the second is an obvious extension once the general mechanism is there...) - Beyond the default keywords defined in RDFa 1.0 already, I also include a number of default namespaces for a some vocabularies (foaf, dc, etc) with the usual prefixes. These are currently wired in the code. The code is not yet optimized, ie, every time a URI is seen in a @vocab, it is re-interpreted. A cashing should be added to the code at some point. The result is quite nice. [3] is really simple and relies on the default namespaces. [4] is the result in turtle. [5] uses an extra keyword and namespace using the vocab file[6], the result being at[7]. Ivan [1] http://www.w3.org/2007/08/pyRdfa/Shadow.html [2] http://rdfa.digitalbazaar.com/specs/rdfa-vocab-20100111.html [3] http://www.ivan-herman.net/Misc/2010/pyrdfatests/simple.html [4] http://tinyurl.com/y8gt79v [5] http://www.ivan-herman.net/Misc/2010/pyrdfatests/rtest.html [6] http://www.ivan-herman.net/Misc/2010/pyrdfatests/vocab.html [7] http://tinyurl.com/yapzszy -- 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 vCard : http://www.ivan-herman.net/HermanIvan.vcf
Attachments
- application/pkcs7-signature attachment: S/MIME Cryptographic Signature
Received on Friday, 19 February 2010 13:03:21 UTC