how to call xsltproc from Mac OS X commandline?

I am writing a bash-script front-end to an XSL transformation (written in oXygen), because several other processes (including some desparate Perl hacks) need to take place around the transform. The target user of this transformation uses oXygen 7.0, but does not otherwise have xsltproc installed. Is it possible to call the copy of xsltproc that oXygen has from the commandline? I tried the obvious {path-to-oXygen-directory}/xsltproc.mac {stylesheet} {in} > {out} but that complained |dyld: Library not loaded: | @executable_path/../Frameworks/libxslt.framework/Versions/1.1.14/libxslt | Referenced from: /Users/Shared/applications/oxygen/xsltproc.mac | Reason: image not found Details for both my system and the target system: * Mac OS X 10.4.5 * oXygen 7.0 build 2006011910 * G4 processor @ >= 1GHz, with >= 1 GiB RAM Although obviously not essential (I have several other options, e.g. * insist target user installs xsltproc, e.g. using Fink * separate the pre- and post- processing steps out and transform from within oXygen * use some other XSLT engine, if it can be called from commandline) it would be nice to get this to work, so help is appreciated, but not worth an enormous amount of effort.

Hello Syd, You can use xsltproc.mac from the command line, but you have to add the oXygen installation directory to the DYLD_LIBRARY_PATH environment variable. Can be like this: mac> export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:{path-to-oXygen-directory} mac> {path-to-oXygen-directory}/xsltproc.mac {stylesheet} {in} > {out} To avoid these commands each time you make the XSL transformations, you can make a script that makes the export and then calls xsltproc; or you can place the export in the .bash_profile file located in your home directory. Other XSLT engine is Saxon, you may find it in the {path-to-oXygen-directory}/lib directory. It can be invoked like this: mac>java -jar {path-to-oXygen-directory}/lib/saxon.jar {in} {stylesheet} Or, for XSLT 2.0, Saxon 8: mac>java -jar {path-to-oXygen-directory}/lib/saxon8.jar {in} {stylesheet} Best regards, Dan Caprioara Syd Bauman wrote:
I am writing a bash-script front-end to an XSL transformation (written in oXygen), because several other processes (including some desparate Perl hacks) need to take place around the transform. The target user of this transformation uses oXygen 7.0, but does not otherwise have xsltproc installed. Is it possible to call the copy of xsltproc that oXygen has from the commandline? I tried the obvious
{path-to-oXygen-directory}/xsltproc.mac {stylesheet} {in} > {out}
but that complained
|dyld: Library not loaded: | @executable_path/../Frameworks/libxslt.framework/Versions/1.1.14/libxslt | Referenced from: /Users/Shared/applications/oxygen/xsltproc.mac | Reason: image not found
Details for both my system and the target system: * Mac OS X 10.4.5 * oXygen 7.0 build 2006011910 * G4 processor @ >= 1GHz, with >= 1 GiB RAM
Although obviously not essential (I have several other options, e.g. * insist target user installs xsltproc, e.g. using Fink * separate the pre- and post- processing steps out and transform from within oXygen * use some other XSLT engine, if it can be called from commandline) it would be nice to get this to work, so help is appreciated, but not worth an enormous amount of effort.
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

mac> export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:{path-to-oXygen-directory}
Dan -- Nice to hear from you. (Although, to be honest, you folks are going to have to post pictures of yourselves: I can no longer remember which one is Dan and which one is Stefan, I'm afraid. Sorry.) Thanks for the environment variable setting -- it worked like a charm. (The target user, btw, is Julia. :-) Thanks again, and get working on www.oxygenxml.com/staff/pictures/! -- Syd Bauman, EMT-Paramedic Senior XML Programmer/Analyst North American Editor Brown University Women Writers Project Text Encoding Initiative Syd_Bauman@Brown.edu 401-863-3835 http://www.tei-c.org/
participants (2)
-
Dan Caprioara
-
Syd Bauman