[x3d-public] X3DJSAIL apps. Generating and compiling Java: new stylesheetX3dToJava.xslt

yottzumm at gmail.com yottzumm at gmail.com
Fri Mar 24 05:24:59 PDT 2017


LOL!  Can you name another product which has 15000 examples before it’s release?

Can you share with me what you did for translating encoded newlines and regular newlines in the scripts that won’t compile?  That is, create Java for your own version and see if you get errors in the scripts?  I can pass X3D files if you like.

John

Sent from Mail for Windows 10

From: Don Brutzman
Sent: Friday, March 24, 2017 2:23 AM
To: yottzumm at gmail.com
Cc: X3D Graphics public mailing list; x3d at web3d.org; Roy Walmsley
Subject: Re: X3DJSAIL apps. Generating and compiling Java: new stylesheetX3dToJava.xslt

John, I'm mimicing your playbook with java source code generation.

Rather than write Javaa source-code generation within X3DJSAIL, I elected to adapt one of the stylesheets instead.  More portable.

	http://www.web3d.org/x3d/stylesheets/X3dToJava.xslt

Datatype detection of contained attribute values is still heuristic, and so might have errors.  Am considering how to achieve a better approach.

Attached is a test scene and interesting source output.  As you have seen, only one semicolon needed to build a whole model!  Declarative approach is quite terse, one might even say it is getting elegant.

Instead of value arrays, am using field objects to emphasize type.  That could be an output option - want to get datatype determination locked down first.

More to follow as this work progresses, more options are always good for all of us.  This sustained progress is great! It really bodes well for other programming language APIs for X3D, other tools adding X3D support, and a rock-solid object model as we continue progressing towards X3D v4.  Enjoy!  8)

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/20170324/e406d3cb/attachment.html>


More information about the x3d-public mailing list