xsl-list
[Top] [All Lists]

[xsl] command line invocation issue

2019-12-15 02:21:52
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 running 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 everything 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.DocumentBuilderFactoryImpl
-Djava.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
-cp
../lib/xercesImpl.jar:../lib/dnaos.jar:../lib/exist.jar:../lib/log4j-1.2.15.jar:../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

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:
  -a                    Use xml-stylesheet PI, not style-doc argument
  -c:filename           Use compiled stylesheet from file
  -cr:classname         Use collection URI resolver class
  -dtd:on|off           Validate using DTD
  -expand:on|off        Expand defaults defined in schema/DTD
  -explain[:filename]   Display compiled expression tree
  -ext:on|off           Allow|Disallow external Java functions
  -im:modename          Initial mode
  -it:template          Initial template
  -l:on|off             Line numbering for source document
  -m:classname          Use message receiver class
  -o:filename           Output file or directory
  -or:classname         Use OutputURIResolver class
  -outval:recover|fatal Handling of validation errors on result document
  -p:on|off             Recognize URI query parameters
  -r:classname          Use URIResolver class
  -repeat:N             Repeat N times for performance measurement
  -s:filename           Initial source document
  -sa                   Schema-aware transformation
  -strip:all|none|ignorable      Strip whitespace text nodes
  -t                    Display version and timing information
  -T[:classname]        Use TraceListener class
  -TJ                   Trace calls to external Java functions
  -tree:tiny|linked     Select tree model
  -traceout:file|#null  Destination for fn:trace() output
  -u                    Names are URLs not filenames
  -val:strict|lax       Validate using schema
  -versionmsg:on|off    Warn when using XSLT 1.0 stylesheet
  -warnings:silent|recover|fatal  Handling of recoverable errors
  -x:classname          Use specified SAX parser for source file
  -xi:on|off            Expand XInclude on all documents
  -xmlversion:1.0|1.1   Version of XML to be handled
  -xsd:file;file..      Additional schema documents to be loaded
  -xsdversion:1.0|1.1   Version of XML Schema to be used
  -xsiloc:on|off        Take note of xsi:schemaLocation
  -xsl:filename         Stylesheet file
  -y:classname          Use specified SAX parser for stylesheet
  -?                    Display this message
  param=value           Set stylesheet string parameter
  +param=filename       Set stylesheet document parameter
  !option=value         Set serialization option
 : argument numérique né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?

Thank you.
Regards,
ac
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>