You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Jukka Zitting <ju...@gmail.com> on 2006/09/05 23:18:38 UTC

XSL transformation from XML to CND nodetype format

Hi,

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
Jackrabbit.

Simple usage with the xsltproc tool from libxslt:

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

BR,

Jukka Zitting

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