[x3d-public] X3DJSAIL: Commented out non-functional but blocking code (new version of saxon????)

Don Brutzman brutzman at nps.edu
Tue Jan 5 20:30:19 PST 2021


On 1/5/2021 8:07 PM, John Carlson wrote:
> 
> In: x3d-code/www.web3d.org/x3d/stylesheets/build.xml
> 
> I commented out the code:
> 
>          <!--java classname="net.sf.saxon.Transform" classpath="${saxon.dir}/${saxon.jar};." failonerror="true">
>          <arg value="-?" description="help information"/>
>          </java-->
> 
> It wasn’t working.
> 
> I haven’t checked in yet.
> 
> Thanks,
> 
> John

John, thanks for not checking in any changes whatsoever to the build process.  That code block works fine, details follow.

The code you are looking at is part of ant target "build versions" which provides diagnostics such as relevant version numbers of currently installed software.  The text output is part of the build logs, which lets us track continuing correctness or changes, in turn placed in version control.

If you look at the full task:

     <target name="versions" description="show tool versions and environment values">
         <echo>ant -version</echo>
         <exec executable="ant"  dir="." vmlauncher="false">
             <arg value="-version"/>
         </exec>
         <echo>java -version</echo>
         <exec executable="java"  dir="." vmlauncher="false">
             <arg value="-version"/>
         </exec>
         <echo>python -version</echo>
         <exec executable="python"  dir="." vmlauncher="false">
             <arg value="--version"/>
         </exec>
         <!-- https://www.saxonica.com/documentation9.5/using-xsl/commandline.html -->
         <echo>saxon -? help</echo>
         <java classname="net.sf.saxon.Transform" classpath="${saxon.dir}/${saxon.jar};." failonerror="true">
         <arg value="-?" description="help information"/>
         </java>
         <echo></echo>
         <!-- Ant environment variables https://ant.apache.org/manual/Tasks/property.html -->
         <echo>  ANT_HOME=${env.ANT_HOME}</echo>
         <echo> JAVA_HOME=${env.JAVA_HOME}</echo>
         <echo>PYTHONHOME=${env.PYTHONHOME}</echo>
         <echo>PYTHONPATH=${env.PYTHONPATH}</echo>
         <echo>Check for X3DJSAIL ${jsai.full.archive.jar.name} or ${jsai.classes.archive.jar.name}</echo>
         <echo>CLASSPATH=${env.CLASSPATH}</echo>
     <!--<echo>USER      =${env.USER}</echo> -->
         <!-- https://stackoverflow.com/questions/949678/ant-is-using-wrong-java-version -->
         <echo>javac source/target      $java.source=${java.source}</echo>
         <echo>Java/JVM version    $ant.java.version=${ant.java.version}</echo>
         <echo>Java/JVM detail version $java.version=${java.version}</echo>
         <echo>Ant version              $ant.version=${ant.version}</echo>
         <echo>Check for node.js installation from https://nodejs.org</echo>
		<exec executable="${node}">
			<arg value="--version"/>
		</exec>
         <echo>Configuration settings:  https://savage.nps.edu/Savage/developers.html</echo>
         <!-- TODO Netbeans version -->
         <!-- TODO Netbeans project version -->
         <!-- DEBUG: to show all environment and local properties, add
         <echoproperties/> -->
         <echo message="==========================================="/>
     </target>

... then you see above that a comment does point to the Saxon command line documentation,

	https://www.saxonica.com/documentation9.5/using-xsl/commandline.html

... which in turn documents the -? switch (near the bottom) as

	-?	Display command syntax

... and when run (i.e. 'build versions') provides the following output:

=============================================================
ant -f C:\\x3d-code\\www.web3d.org\\x3d\\stylesheets versions
versions:
ant -version
Apache Ant(TM) version 1.10.9 compiled on September 27 2020
java -version
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment (build 15.0.1+9-18)
OpenJDK 64-Bit Server VM (build 15.0.1+9-18, mixed mode, sharing)
python -version
Python 3.9.1
saxon -? help
Saxon-HE 9.7.0.13J from Saxonica
Usage: see http://www.saxonica.com/html/documentation/using-xsl/commandline.html
Format: net.sf.saxon.Transform options params
Options available: -? -a -catalog -config -cr -diag -dtd -ea -expand -explain -export -ext -im -init -it -l -license -m -nogo -now -o -opt -or -outval -p -pack -quit -r -repeat -s -sa -scmin -strip -t -T -target -threads -TJ -TP -traceout -tree -u -val -versionmsg -warnings -x -xi -xmlversion -xsd -xsdversion -xsiloc -xsl -xsltversion -y
Use -XYZ:? for details of option XYZ
Params:
   param=value           Set stylesheet string parameter
   +param=filename       Set stylesheet document parameter
   ?param=expression     Set stylesheet parameter using XPath
   !param=value          Set serialization parameter

   ANT_HOME=C:\apache-ant-1.10.9
  JAVA_HOME=C:\Program Files\Java\openjdk\jdk-15.0.1
PYTHONHOME=C:\Users\brutzman\AppData\Local\Programs\Python\Python39\
PYTHONPATH=C:\x3d-code\www.web3d.org\x3d\stylesheets\python\x3d;
Check for X3DJSAIL X3DJSAIL.4.0.full.jar or X3DJSAIL.4.0.classes.jar
CLASSPATH=C:\x3d-code\www.web3d.org\x3d\stylesheets\java\jars\X3DJSAIL.4.0.full.jar;C:\x3d-code\www.web3d.org\x3d\stylesheets\java\lib\saxon9he.jar;
javac source/target      $java.source=1.8
Java/JVM version    $ant.java.version=15
Java/JVM detail version $java.version=15.0.1
Ant version              $ant.version=Apache Ant(TM) version 1.10.9 compiled on September 27 2020
Check for node.js installation from https://nodejs.org
v14.3.0
Configuration settings:  https://savage.nps.edu/Savage/developers.html
===========================================
BUILD SUCCESSFUL (total time: 2 seconds)
=============================================================

So indeed, the -? switch lists all saxon invocation options available via command line, which is the same as saxon invoked via ant.

Those "Options available" tell us what other switches we might use and corresponding invocation syntax.

And now you know what my "official build" is doing.  So the build log is helpful for comparison if your build outputs aren't matching mine, we can zero in on the difference.  Further having all this is version control gives us history of problems/improvements.

* build.out.X3DJSAIL.txt
   https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/build.out.X3DJSAIL.txt

My build motto: "when the going gets tough, the tough get... verbose"

I hope this is better understandable now.  Thanks for asking.

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list