Nice! Looks clean and compact.
I could also think of an additional declarative layer that integrates your approach with something similar to xquery templating in exist-db [1]
I've already done a POC implementation of the exist-db templating way using basex. Essentially it is just stepping trough some template markup and dynamically mapping annotations/attributes to function calls.
Drop a line if you are interested in extending your approach.
[1] http://exist-db.org/exist/apps/doc/templating.xml?q=template&field=all&a...
2014-11-26 20:42 GMT+01:00 Marc van Grootel marc.van.grootel@gmail.com:
It was already up for a while but DNS issues made my blog go missing for almost a week. Now it's back.
http://xokomola.com/2014/11/18/xquery-origami-2.html
The post describes how to do screen scraping using Origami extractors. I'm quite happy with the outcome.
--Marc