Small update of the RDFa distiller sofware

I have made a small update on the pyRdfa Python package that drives the RDFa distiller. The main differences between this version and the previous are:

  • via a private communication Dan Brickley made me think on the following: what is the proper return format when an exception is found during processing (e.g., if there is a parsing error)? Up until the previous version the distiller caught the exception and returned and HTML page with the error message. Which is fine if one runs, say, the software from the distiller page. But what should happen if the caller expects an RDF graph and only an RDF graph? Surely the return should be, well, a graph containing the errors… so I have implemented this. I.e., in case of an exception, the distiller now looks into the accept header and, unless the header indicates html with a higher priority, a graph is returned (in RDF/XML or Turtle, depending on the caller’s settings).
  • Richard Cyganiak found a bug on the way the @property attributes with XML subtrees are handled. It is a bit of an edge case; we realized that there is not even a test case for this in the RDFa test suite:-( But there are some nice use cases that indeed went wrong (like the one by Florian Schmedding). (You can look at the mail archive for further details if interested.)

Nice holidays, everyone!

About Ivan Herman

Ivan Herman is the leader of the Digital Publishing Activity at W3C. For more details, see http://www.w3.org/People/Ivan/

2 thoughts on “Small update of the RDFa distiller sofware

  1. Thanks Ivan for fixing the recurse bug.

    About reporting errors in RDF: This is a nice idea and hopefully a practice that will catch on elsewhere. I wonder if the Distiller should also answer with an HTTP status code different from the usual 200 OK – to more clearly indicate that the result is not the RDF extracted from the requested web page, but an error message. The most adequate code might be 400 Bad Request.

Comments are closed.