Monday 4 October 2010

XQJ: binding document or sequence in pipeline

Bad thing from Cocoon / SAX pipeline point of view.
I found no way to bind SAX events effectively. Two options are available:

  • SAXSource - you must buffer events and then send them out on parse() method on XMLReader.
  • Provide StAX stream.

Both require buffering of SAX events, which can be a trouble in case of large XMLs. It kills all the elegancy and small memory foot-print.

An alternative would be to use StAX pipelines, which makes XSLT for example less effective.

I hope I mess something in docs, but...


So I must abandon the idea of using XQJ with C3 and Sedna for a moment, additional reasons: Sedna doesn't support latest XQuery things XQJ is good for and available XQJ implementation has closed source.
I switch back to default Sedna API.

1 comment:

  1. I am actually also looking into XQJ. Can you have a look at http://robbypelssers.blogspot.com/2011/07/using-xqj-api-with-cocoon3.html and let me know your opinion?

    ReplyDelete