[ckan-dev] Escaping strings in N3 output
Joshua Tauberer
tauberer+consulting at govtrack.us
Tue Sep 18 15:09:52 UTC 2012
Hi again,
I was able to edit the package .rdf RDF/XML output template to add new
predicates. For instance, we store URIs in an extras field to reliably
identify the author of a dataset.
example:
http://hub.healthdata.gov/dataset/2008-basic-stand-alone-carrier.rdf
our template adds dct:creator / dc:publisher nodes
Now I'm trying to bring the N3 template up to date with the RDF/XML
template changes. However I'm finding that strings aren't escaped in the
output, so embedded quotes in extras field values (for example) bust the
file if I have something like this in the template:
dc:subject "${extra_dict.get('value','')}";
because it may generate
dc:subject "quote chars "here" break N3 syntax";
Is this a bug? A limitation? I know that Genshi doesn't know what N3 is,
so I'm not entirely expecting CKAN to be able to handle this easily.
It's fine if it's not really supported --- this is just icing on the
cake for us. The RDF/XML works fine for us.
--
- Joshua Tauberer
- http://razor.occams.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120918/861ff7c4/attachment.html>
More information about the ckan-dev
mailing list