Subject: Re: [xsl] command line invocation issue From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 15 Dec 2019 09:25:49 -0000 |
Hi,
We are turning to this list because the solution to this is probably very simple, but we seem to require an experienced developer eye to see it.
We have had an xslt2/Saxon application runningB fine for some years, under Windows, but now we need to upgrade it to xslt3, with Saxon still, but under Linux (Debian/Ubuntu).
As a first step we keep everythingB the same as before and just copy the directory and file structure to try to first handle the Win10 to Linux conversion, starting with the command line invocation (Java, Saxon, libraries, and the transform). We converted the separators (\ -> /, % -> $, ; -> :), and now the invocation script tests as a valid Bash script. All referenced libraries are marked as executable and they now all seem to load. Yet, we still get an error message. We did try to remove/replace all invocation items, one after the other, as well as search the web, but to no avail, so far.
The Bash script reads like this: #!/bin/bash java -Xms3840m -Xmx3840m -server -Dfile.encoding=utf8
-Djava.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuil derFactoryImpl
-Djava.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryIm pl
-cp
../lib/xercesImpl.jar:../lib/dnaos.jar:../lib/exist.jar:../lib/log4j-1.2.15.j ar:../lib/ws-commons-util-1.0.2.jar:../lib/xmldb.jar:../lib/xmlrpc-client-3.1 .2.jar:../lib/xmlrpc-common-3.1.2.jar:../lib/saxon.jar:../lib/saxon-dom.jar:. ./lib/dom4j.jar:../lib/sxutil.jar
net.galasoft.dnaos.saxon.Transform -warnings:recover -o:cosmos.html -s:build/$1.xml -xsl:dnaos.xslt exit 0
What does net.galasoft.dnaos.saxon.Transform do exactly? Any chance it somehow needs to be adapted to "call" net.sf.saxon.Transform properly/differently?
argument
The invocation itself reads like this : bash script.sh foo
The returned error message reads like this: Saxon 9.1.0.8J from Saxonica Java version 11.0.4 Bad param=value pair on command line: Usage: see http://www.saxonica.com/documentation/using-xsl/commandline.html Options: B -a B B B B B B B B B B Use xml-stylesheet PI, not style-doc
B -c:filename B B B B B Use compiled stylesheet from file B -cr:classname B B B B Use collection URI resolver class B -dtd:on|off B B B B B Validate using DTD B -expand:on|off B B B B Expand defaults defined in schema/DTD B -explain[:filename] B Display compiled expression tree B -ext:on|off B B B B B Allow|Disallow external Java functions B -im:modename B B B B B Initial mode B -it:template B B B B B Initial template B -l:on|off B B B B B B Line numbering for source document B -m:classname B B B B B Use message receiver class B -o:filename B B B B B Output file or directory B -or:classname B B B B Use OutputURIResolver class B -outval:recover|fatal Handling of validation errors on result document B -p:on|off B B B B B B Recognize URI query parameters B -r:classname B B B B B Use URIResolver class B -repeat:N B B B B B B Repeat N times for performance measurement B -s:filename B B B B B Initial source document B -sa B B B B B B B B B Schema-aware transformation B -strip:all|none|ignorable B B B Strip whitespace text nodes B -t B B B B B B B B B B Display version and timing information B -T[:classname] B B B B Use TraceListener class B -TJ B B B B B B B B B Trace calls to external Java functions B -tree:tiny|linked B B Select tree model B -traceout:file|#null B Destination for fn:trace() output B -u B B B B B B B B B B Names are URLs not filenames B -val:strict|lax B B B Validate using schema B -versionmsg:on|off B B Warn when using XSLT 1.0 stylesheet B -warnings:silent|recover|fatal B Handling of recoverable errors B -x:classname B B B B B Use specified SAX parser for source file B -xi:on|off B B B B B B Expand XInclude on all documents B -xmlversion:1.0|1.1 B Version of XML to be handled B -xsd:file;file.. B B B Additional schema documents to be loaded B -xsdversion:1.0|1.1 B Version of XML Schema to be used B -xsiloc:on|off B B B B Take note of xsi:schemaLocation B -xsl:filename B B B B Stylesheet file B -y:classname B B B B B Use specified SAX parser for stylesheet B -? B B B B B B B B B B Display this message B param=value B B B B B Set stylesheet string parameter B +param=filename B B B Set stylesheet document parameter B !option=value B B B B Set serialization option B : argument numC)rique nC)cessaire
Please note that the last error message line (in French, meaning ": numerical argument required") could be coming from the OS (Debian with French configuration).
The other message lines could be coming from Saxon, unless the first error message line ("Bad param=value pair on command line: ") would be from Java (OpenJDK), although it does not look like a typical Java error, or from Bash but the script was validated, it seems, or from something else ...
Saxon seems to report an invocation issue but the invocation is the same as before (... Transform -warnings:recover -o:cosmos.html -s:build/$1.xml -xsl:dnaos.xslt) and $1.xml is properly interpreted as build/foo.xml, as well, there are no param=value pair used for Saxon.
Can anyone help us see more clearly or follow a new track?
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] command line invocation i, Andre Cusson akhu01@ | Thread | [xsl] Running the same transformati, Trevor Nicholls trev |
[xsl] Running the same transformati, Trevor Nicholls trev | Date | Re: [xsl] Running the same transfor, Martin Honnen martin |
Month |