Subject: Re: [xsl] command line invocation issue From: "Andre Cusson akhu01@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 15 Dec 2019 10:00:21 -0000 |
Hi Martin, Good question, but yes, net.galasoft.dnaos.saxon.Transform invokes/subclasses net.sf.saxon.Transform. It has been working fine for years with no changes, except the OS. Now, yes, in theory it could still require adaptation, but as noted to Dave a moment ago, The transform now works if the invocation is typed interactively at the command line prompt. The issue remains in the Bash script file, meaning that it seems like a command line interpreter issue that still needs to get figured out. Any suggestion is much appreciated. Thank you. Regards, ac Le dim. 15 dC)c. 2019 C 04:47, Andre Cusson <acusson@xxxxxxxxxxxxxxxxxxxx> a C)crit : > Hi Dave, > > You are right, the line is a little long. > I just copied it from the script file. > > Breaking the line up into multiple lines in the script file by ending each > one with \ (with nothing after it) does not work as Bash seems to just see > separate commands that it does know about ... Yet, interactively, it works > ... > In other words, if the different backslash terminated segments are typed > interactively at the command prompt, not only are all the line segments > concatenated to a single command, but that command works and executes the > transform ... without the previous error messages. > > Within the script file: nada, same as before. We do need the script as the > line is a little long, but also mostly for the positional arguments ($1, > $2, ...). > > We still need to resolve the problem, but clearly Saxon is not at stake > and it is a command line interpreter issue. > > I thank you for the insight that you have provided. > > Regards, > ac > > > Le dim. 15 dC)c. 2019 C 03:38, Dave Pawson dave.pawson@xxxxxxxxx < > xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> a C)crit : > >> Quick guess, you have a newline in your script? Try using bash >> continuation lines to make it more readable? >> >> HTH >> >> 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 >> -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 >> > >> > 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 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? >> > >> > Thank you. >> > Regards, >> > ac >> > >> > >> > XSL-List info and archive >> > EasyUnsubscribe (by email) >> >> >> >> -- >> Dave Pawson >> XSLT XSL-FO FAQ. >> Docbook FAQ.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] command line invocation i, Andre Cusson akhu01@ | Thread | Re: [xsl] command line invocation i, Martin Honnen martin |
Re: [xsl] command line invocation i, Andre Cusson akhu01@ | Date | Re: [xsl] command line invocation i, Pieter Masereeuw pie |
Month |