Re: [xsl] command line invocation issue

Subject: Re: [xsl] command line invocation issue
From: "Dave Pawson dave.pawson@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Dec 2019 08:38:00 -0000
Quick guess, you have a newline in your script? Try using bash
continuation lines to make it more readable?


On Sun, 15 Dec 2019 at 08:21, Andre Cusson akhu01@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> 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
pl -cp
./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 foo
> The returned error message reads like this:
> Saxon from Saxonica
> Java version 11.0.4
> Bad param=value pair on command line:
> Usage: see
> 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 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
> 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
> EasyUnsubscribe (by email)

Dave Pawson
Docbook FAQ.

Current Thread