jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject XSL transformation from XML to CND nodetype format
Date Tue, 05 Sep 2006 21:18:38 GMT

There's been a few mentions about writing an XSL transformation for
converting node type definitions from the XML format to the more
readable CND format. The equivalent functionality is already available
in terms of the XML and CND reader and writer classes in Jackrabbit,
but an XSL transformation is in many cases a more convenient tool.

Attached is a simple implementation of this transformation. I just
hacked it together for a moment's need, so it for example fails to
properly quote strings and doesn't set up correct namespace mappings.
I'm posting it hoping that someone perhaps finds it useful or that it
could eventually evolve to a point where we could use it to avoid the
duplicate functionality in the node type reader and writer classes in

Simple usage with the xsltproc tool from libxslt:

    $ xsltproc xml2cnd.xslt nodetypes.xml
    ... (outputs the CND node type definitions)


Jukka Zitting

Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development

View raw message