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

RDFa support in Jena GRDDL Reader (SVN)

From: Jeremy Carroll <jjc@hpl.hp.com>
Date: Fri, 25 May 2007 13:40:15 +0100
Message-ID: <4656D92F.2060303@hpl.hp.com>
To: Paolo Castagna <paolo.castagna@hp.com>, jena-devel <jena-devel@lists.sourceforge.net>
CC: GRDDL Working Group <public-grddl-wg@w3.org>, RDFa <public-rdf-in-xhtml-tf@w3.org>

RDFa support now in Jena GRDDL Reader, even without a GRDDL profile 
being specified. Also includes HTML tidy.
Uses v0.8 of Fabien's transform.

(Not yet released, but can be built from public sources)

Note to WGs:
This was an easy extension to a GRDDL aware agent, taking only an hour 
or two for coding and testing. This can be interpreted as showing that 
the two technologies have synergy.
Background: Paolo wants RDFa support in Jena.


Hi Paolo

I've made my first effort at adding RDFa support.

You need to get the SVN copy of the Jena GRDDL Reader.
The minimal documentation is found on the setProperty method of

The example test code is:

     	Model m = createMemModel();
     	RDFReader r = m.getReader("GRDDL");
     	r.setProperty("grddl.rdfa", "true");
         Model m2 = createMemModel();
         assertIsoModels(m2, m);

The key line is:

     	r.setProperty("grddl.rdfa", "true");

this disables all other GRDDL processing and adds Fabien's transform as 
the only transformation (for all (X)HTML input).

NB: the SVN version is not recommended for general use since I fiddle 
with the security features, and some are currently disabled. With the 
grddl.rdfa property set, the risks are much less: essentially you are 
exposed to Fabien's computer being subverted.

The test above was quite slow (about 10 seconds). I could add caching 
for transforms, so that you don't keep getting Fabien's transform when 
doing a lot of files. However, caching is not yet on my horizon.


Hewlett-Packard Limited
registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England
Received on Friday, 25 May 2007 12:40:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:01:50 UTC