[x3d-public] Patch for X3DJSAIL

John Carlson yottzumm at gmail.com
Mon Oct 2 03:57:20 PDT 2017


Here’s the latest patch. The result code output from X3DJSAIL still doesn’t work, but changes should be able to be applied without breaking anything.  The usage documentation is unchanged.

https://github.com/coderextreme/JavaSceneAuthoringInterfaceLibrary/blob/master/CreateX3DJSAI.patch

Sorry, I don’t really know what classes the code goes in.  If I get the time, I will do some searching.

I believe the rest of the changes besides X3DObject.java are in CommandLine.java, but I don’t really know.

John

Sent from Mail for Windows 10

From: Don Brutzman
Sent: Sunday, October 1, 2017 10:44 PM
To: John Carlson
Cc: x3d-public at web3d.org
Subject: Re: Patch for X3DJSAIL

On 9/28/2017 8:11 PM, John Carlson wrote:
> Patch for CreateX3dSceneAccessInterfaceJava.xslt
> 
> Important things:
> 
>  1. <String>’s on line 340

OK have modified it to match your preferred form.  Not sure why though, prior 
construct didn't have any warnings.  Plus similar constructs exist for other 
types.  Is this a pyjnius transcoding issue?

340c340
< <xsl:text disable-output-escaping="yes">new 
ArrayList<>(Arrays.asList(</xsl:text><!-- ArrayList<> -->
---
 > <xsl:text disable-output-escaping="yes">new 
ArrayList<String>(Arrays.<String>asList(</xsl:text><!-- ArrayList<> -->

>  2. Imports

Please advise what this is for - perhaps add a more verbose comment as well?

Also please reconfirm class of interest, there have been some edits so I didn't 
want to put it in the wrong place.

762a763,766
 > // Script operations
 > import javax.script.ScriptEngineManager;
 > import javax.script.ScriptEngine;
 > import javax.script.ScriptException;
2958c2962

>  3. The rest would be nice to have, because I have to keep updating the
>     stylesheet, but I don’t have a “working” version yet.

Am reluctant to change directory structure, the entire build process depends on 
it and not sure why you need it:

41c41
< 	<xsl:variable name="saiPackageDirectorySource"> 
<xsl:text>src/org/web3d/x3d/sai</xsl:text></xsl:variable>
---
 > 	<xsl:variable name="saiPackageDirectorySource"> 
<xsl:text>src/main/java/org/web3d/x3d/sai</xsl:text></xsl:variable>
46c46
< 	<xsl:variable name="concretePackageDirectorySource"> 
<xsl:text>src/org/web3d/x3d/jsail</xsl:text></xsl:variable>
---
 > 	<xsl:variable name="concretePackageDirectorySource"> 
<xsl:text>src/main/java/org/web3d/x3d/jsail</xsl:text></xsl:variable>

The following change in X3DObject was superfluous and not needed:

	FILE_EXTENSION_JAVASCRIPT
to
	X3DObject.FILE_EXTENSION_JAVASCRIPT

> It does create an appropriate JavaScript file, butX3DJSAIL doesn’t work with this command:
> 
> $ java -cp 
> "target/X3DJSONLD-1.0-SNAPSHOT.jar;../pythonSAI/X3DJSAIL.3.3.full.jar;saxon9he.jar" 
> net.x3djsonld.data.abox js growl.js
> 
> [ growl.sh in X3DJSONLD ]

Last nights changes should fix any need to have saxon9he.jar in classpath.  Use 
X3DJSAIL.3.3.full.jar to test that out.  Don't miss the ant build changes in 
parent stylesheets/ directory, they are significant.  Online at

https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/CreateX3dSceneAccessInterfaceJava.xslt

Updated today: added -validate switch and various improvements for CommandLine 
and X3DLoaderObject.  Also noted some missing min/max inclusive/inclusive values 
in X3D Unified Object Model; these are now listed in X3D XML Schemas (3.2 3.3 
4.0), the object model file, and corresponding X3DJSAIL validation methods.

I tried to apply your patch using Netbeans > Tools > Apply Diff Patch but it 
didn't work, probably because I had made too many changes.

Am hoping you can redo the patch or (likely better) just send me the plain code 
blocks and indicate class name(s) where to add them.

> Attached,
> 
> John

thanks, let's keep iterating please.  8)

p.s. just released: Java 9.  haven't tried it yet.

	https://docs.oracle.com/javase/9/whatsnew/toc.htm

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20171002/f6512f95/attachment.html>


More information about the x3d-public mailing list