I have recently written a small Java web app called Retailer, which is a
platform for server-side XSLT-based web apps. It's a bit experimental and
I'd appreciate comment and especially feedback from people who want to try
it out.
https://github.com/Conal-Tuohy/Retailer
Then to run on top of the platform I have written (so far) a couple of
applications which expose the national digitised newspaper collections of
Australia and New Zealand (Trove and Papers Past, respectively).
So Retailer is of interest if you want to harvest bulk historical newspaper
articles from Austalia and NZ, but I think it may be more generally of
interest to librarians as a way to host small web applications they have
written in pure XSLT, because I know lots of librarians do have XSLT
skills.
I see it as a tool for hosting small protocol-converters, query-handlers,
and formatters on the web.
For example it could be used to implement Atom feeds or OAI-PMH
repositories on top of some back-end web API; perform HTTP content
negotiation over a SPARQL store; as a front-end proxy adding metadata
crosswalks to back-end OAI-PMH servers; exposing XML back ends as JSON, or
CSV; that kind of thing.
The Retailer platform is not at all complicated (it's not Cocoon!). I've
deliberately designed the platform as something very light-weight that
defers as much as possible to an XSLT script. The XSLT defines the full
application, not just a metadata crosswalk or a presentation layer. It is
responsible for parsing the HTTP request, performing any application logic,
and formatting the results. The only way to call back-end services is via
HTTP using the XPath document() function. So it's not for running big
complicated apps, I would say, but for simple apps that are mainly protocol
converters in front of one or more "Web APIs", XSLT can be quite concise.
How it works is it just creates an XML document from each HTTP request it
receives (i.e. the request URI, HTTP headers, etc.), passes the XML to your
XSLT, and returns the XSLT's output to the HTTP client. e.g. here is
Retailer running an "identity" stylesheet:
http://conaltuohy.com/identity/foo/bar/baz?parameter-1=one¶meter-2=two
Feel free to play around with the URL; anything beginning with
http://conaltuohy.com/identity/ will be handled by the same stylesheet.
(stylesheet = <
https://github.com/Conal-Tuohy/Retailer/blob/master/etc/identity.xsl>)
I've written a couple of blog posts about Retailer and about the two
newspaper collections:
http://conaltuohy.com/blog/tag/retailer/
I hope people will find interesting and useful, and I'd be delighted to
hear any feedback on it.
Cheers
Conal
https://twitter.com/conal_tuohy
|