[x3d-public] X3DJSAIL errors when compiling Java generated from X3D resourcesJSON examples. Needs work

yottzumm at gmail.com yottzumm at gmail.com
Thu Jan 26 11:32:30 PST 2017



Sent from Mail for Windows 10

From: Don Brutzman
Sent: Thursday, January 26, 2017 2:03 PM
To: yottzumm at gmail.com
Cc: Roy Walmsley; X3D Graphics public mailing list
Subject: Re: X3DJSAIL errors when compiling Java generated from X3D resourcesJSON examples. Needs work

you ... are ... awesome ... man !!!  8)

You are awesome too!

Looks like you are using your X3DJSONLD library to parse and convert the .json examples.

Looking at javaerrors.txt, not critical but it might be helpful if you could intersperse each error report with directory path / filename.

That should be done, at least in the latest zip.  It’s my file path.  Yours may be different, adding an extension (I convert to python, x3d, and java).

Seems like we have another level of validation occurring...

You might want to output <meta name='warning'/> or <meta name='error'/> elements since they document known errors in scenes.  not all schematron errors are so documented...  when further errors are found in the X3D models (converted .json or source-XML .x3d), we can then fix or document those.

Yes, I should do that.  Right now, I’m outputting JSON and then promptly overwriting it, so I don’t really have a copy.  However, it should show up in the diff prior to the overwrite once I put it in, and we have better diifs (see email about floats with and without .0 ).

Wondering, are DEF ids such as field0_0_8_0_2_4_8 just a pseudorandom unique value or do they reflect document tree structure somehow?

Those are variables, I think.   They are increments of the child nodes (x2 I guess).  I am not sure why they aren’t incremented by one.  They do reflect document tree (see java code in tar).

not sure what JSON input syntax should be for
> FontStyle justify newValue="[MIDDLE, MIDDLE]" has illegal value, must use a valid enumeration string.

... but Java output syntax would look something like

myFontStyle.setFamily (FontStyleObject.FAMILY_SERIF)
	   .setJustify(FontStyleObject.JUSTIFY_MIDDLE_MIDDLE)
	   .setTopToBottom(FontStyleObject.TOPTOBOTTOM_DEFAULT_VALUE);

or

myFontStyle.setFamily ("SERIF")
	   .setJustify(new String[] {"\"MIDDLE\",\"MIDDLE\""})
	   .setTopToBottom(true);

I am not sure why you are creating a string array out of one element.  I think this is more correct, but you can have it your way if you like:

./www_web3d_org/x3d/content/examples/X3dForWebAuthors/Chapter14_Prototypes/WhereAmIExample.java:              FontStyle0_2_15_0_0.setJustify(new String[] {"MIDDLE","MIDDLE"});

Maybe support both the array (my way) and a X3D MFString (a single String).

John

On 1/26/2017 12:36 AM, yottzumm at gmail.com wrote:
> Zip containing good Java archive (one file???), bad Java archive, and list of compilation and runtime errors:
>
> http://coderextreme.net/JavaCompile.zip
>
> Still using the old imperative style.  Accepting updates to https://github.com/coderextreme/X3DJSONLD/blob/master/JavaSerializer.js to move to new declarative style.
>
> I’ll probably get to it once my carpal tunnel calms down again.
>
> Thanks,
>
> John

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/20170126/48d6e140/attachment.html>


More information about the x3d-public mailing list