You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Lukas Eder <lu...@gmail.com> on 2013/04/10 10:38:42 UTC

Using XSLT to transform JCR content into XHTML / XML / any other output

Hello,

I've recently published a draft version of a Jackrabbit contribution
on GitHub, wrapping JCR entities into DOM types in order to be able to
leverage higher-level XML APIs such as XPath, XSLT, JAXB and
third-party tools built on top of DOM, such as jOOX for instance. The
draft implementation and examples can be seen here:
https://github.com/lukaseder/jcr-stuff

While I think that this contribution should go into Jackrabbit, I was
generally wondering if Sling users might find it useful if Sling
provided an out-of-the-box support for XSL transformation, similar to
how HTML and JSON "transformation" currently works. In other words:

- /path/to/content.html uses a JSP to generate HTML output
- /path/to/content.json uses a servlet to generate JSON output
- /path/to/content.xml could use an XSL file to generate XML output

Even with JSON becoming more and more popular in web development, many
people still take advantage of XML's wide applicability and the fact
that XML, XSL and associated standards are open W3C standards.
Supporting XSLT out of the box in Sling seems like an interesting
option to me, which aligns very well with Sling's way of thinking,
providing powerful means of resource management along with resource
rendering.

Please let me know what you think, and feel free to also join the
discussion on the Jackrabbit user group:
http://mail-archives.apache.org/mod_mbox/jackrabbit-users/201304.mbox/%3cCAB4ELO4ST_Jut2eGvs+J9Nejn5tu1Vam9rnpWTw7RMALDd3iBA@mail.gmail.com%3e

Cheers
Lukas