Xslt 2.0 and Ruby on OS X

I am trying to parse an XML document in an XSLT 2.0 worksheet. However, they tell me that the OSX 10.5.x libraries only support XSLT 1.0 operations. When I look at xsltproc, I get the following:

hmasing $ xsltproc --version Using libxml 20616, libxslt 10112 and libexslt 810 xsltproc was compiled against libxml 20616, libxslt 10112 and libexslt 810 libxslt 10112 was compiled against libxml 20616 libexslt 810 was compiled against libxml 206

Does anyone have a quick installation guide for XSLT 2.0, ruby ​​xslt gems to work with these libraries, and some good fu to go my way? Please assume that I am a complete idiot in any instructions. Any help is much appreciated!

  • Hans
+2
ruby xslt macos
source share
1 answer

Unfortunately, Saxon is the only game in the city with free XSLT 2.0 implementation. Saxon itself is brilliant, but it is only Java or .NET, with all that implies.

A call from the command line or system call will depend on the JVM each time, so you probably won't want to do this.

Some things you can try:

1) Are you sure you need XSLT 2.0? If you are not using features that are not available in version 1.0, your XSLT may be compatible with 1.0. Then you can use xsltproc. If you need to EXSLT, xsltproc has some support for this.

2) If you definitely need 2.0, you need to create some kind of shell for the saxon. Much depends on which environment you want to use this in, so it could be a web service or something like that. For the project I'm working on, we use a small TCP listener program that wraps Saxon. You can see it here: http://idp.atlantides.org/svn/idp/idp.contenttool/trunk/epiduke_saxon/ It works great for batch command line conversions and is very fast.

+5
source share

All Articles