David Powell wrote:
Sunday, January 30, 2005, 1:10:18 AM, you wrote:



David Powell wrote:

I don't think using an XSLT processor followed by an RDF/XML parser
would be much fun in practise - a SAX based convertor would be much
simpler.

Those two are not incompatible.

Example: Xalan can accept a SAX input stream and can produce a SAX input
stream.  Jena can accept a SAX input stream.

Some XSLT constructs (example: sort) can effectively render this moot,
but overall Xalan tries really, really hard to stream.

I meant, although:

  XML --[XSLT]--> RDF/XML --[RDF/XML-parser]--> RDF-model

...is an ok reference implementation for demonstrating an RDF mapping,
the mapping should be defined in prose, because:

  XML --[SAX]--> RDF-model

...would be a lot more efficient and doesn't have so many
dependencies. So basically you could navigate the Atom document, and
add appropriate statements to an RDF model using the model API.

If one were to package Jena and Xalan into a single jar, you get something very much like your latter picture above. Expanding it, you get:


  XML --[Xalan]--> SAX --[Jena]--> RDF-model

Note: you never produce an complete intermediate RDF/XML representation (either as a DOM or as a string), everything is via pipelined SAX processing.

An example of an application which leverages such an approach (as well as sophisticated caching) can be found at http://cocoon.apache.org/2.0/

- Sam Ruby



Reply via email to