[x3d-public] second release: X3DJSAIL Javatranslations, javadocinX3DExamplesArchives

yottzumm at gmail.com yottzumm at gmail.com
Tue Apr 18 11:03:38 PDT 2017


Okay there were more exceptions about components in X3D-Edit.  So I tried to fix them with this, but it didn’t fix them.  I also tried one or the other component.  I am opening this to a wider audience.  See zip john2.zip on my website for an X3D file that I’m trying to validated with X3D-Edit.

Here’s the file:  http://coderextreme.net/X3DJSONLD/john2.x3d


And here’s the report from BSContact ???

--------------------------------------------------------------------------------------------
Loading scene C:\Users\coderextreme\Downloads\john2 (1).x3d
X3D syntax error:  in C:\Users\coderextreme\Downloads\john2.x3d:
Error during X3D SAX parsing: SAXParseException: Unbound prefix in line 3 column 0 

X3D syntax error:  in C:\Users\coderextreme\Downloads\john2.x3d:
Error during X3D SAX parsing: SAXParseException: Unbound prefix in line 3 column 0 

The file loads in Octaga, but I’m looking for my model somewhere.  I guess it’s transparent or something, or very small.  Hmm.  No, it’s my vertex shader is wrong I think.  I’m not using gl_ variables.  I WANT PORTABLE SHADERS! FOR THE SECOND TIME TODAY! Can I provide different URLs for different vendors?

John


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile="Immersive" version="3.3" xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>
      <head>
        <component name='EnvironmentalEffects' level='1'/>
        <component name='EnvironmentalEffects' level='3'/>

Sent from Mail for Windows 10

From: yottzumm at gmail.com
Sent: Tuesday, April 18, 2017 1:29 PM
To: Don Brutzman
Cc: Roy Walmsley; Alexander Kern
Subject: RE: second release: X3DJSAIL Javatranslations,javadocinX3DExamplesArchives

New http://coderextreme.net/john2.zip is available which no longer contains profile=”Full”, but rather profile=”Immersive”  I will look for more exceptions, but the results so far are the same.

John

Sent from Mail for Windows 10

From: yottzumm at gmail.com
Sent: Tuesday, April 18, 2017 9:41 AM
To: Don Brutzman
Cc: Roy Walmsley; Alexander Kern
Subject: RE: second release: X3DJSAIL Java translations,javadocinX3DExamplesArchives

More and more interesting.   I went ahead and set my netbeans options to -J-Xmx2g with trepidation.  Then I reopened netbeans/X3D-Edit, clicked through the open file warning message (that still said 22Mb), opened the file (see link in previous message/below), and clicked the validation check button.  I have gotten this much output so far.  An Unexpected Exception showed up (possibly unrelated to validation) that said "Could not find the definition file for the profile Full”.  I will try changing the profile on the file, etc.  I got the same error on a much smaller file and it finished validating.  Will there be an update to X3D-Edit for profile “Full” or am I doing something wrong?

>From the X3D Resources Examples:

./Basic/development/TestDiagnosticOverloadedChildNodes.x3d:<X3D profile='Full' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>
./Basic/X3dSpecifications/ExtrusionEdgeCases.x3d:<X3D profile='Full' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>

From:

X3dForWebAuthors/Chapter01TechnicalOverview/HeaderProfileComponentMetaExample.x3d:

Simple scene demonstrating X3D header, profile, component and meta-tag definitions. The component tags raise the support level from Immersive profile to include other components included in the X3D 3.0 Full profile.

So obviously, I am fool, and should use components.  I suspect there will be more on this later.

John
--------- Commence validation checks for john2.x3d ---------

Performing well-formed XML check...
Checking file:/C:/Users/coderextreme/Documents/NetBeansProjects/JavaSceneAuthoringInterfaceLibrary/src/main/resources/john2.x3d...
Well-formed XML check: pass

Performing DOCTYPE check...
[X3dDoctypeChecker] success: valid XML declaration found; success: final X3D 3.3 DOCTYPE found.

Performing DTD validation...
Checking file:/C:/Users/coderextreme/Documents/NetBeansProjects/JavaSceneAuthoringInterfaceLibrary/src/main/resources/john2.x3d...
XML DTD validation: pass

Performing X3D schema validation...
Checking file:/C:/Users/coderextreme/Documents/NetBeansProjects/JavaSceneAuthoringInterfaceLibrary/src/main/resources/john2.x3d...
Referenced entity at "nbres:/org/web3d/x3d/externals/schemas/x3d-3.3-Web3dExtensionsPublic.xsd".


From: yottzumm at gmail.com
Sent: Tuesday, April 18, 2017 7:43 AM
To: Don Brutzman
Cc: Roy Walmsley; Alexander Kern
Subject: RE: second release: X3DJSAIL Java translations, javadocinX3DExamplesArchives

I feel your pain.  My json2all.js program finally ran out of heap space.  Time to revisit my conversions.  Apparently, I am trying to convert to too many things at the same time (or there’s a leak somewhere, hmm).   I will look into using some tail recursion as well.

How do you plan to get around the “too many constants” report from javac?  Can we append() strings of floats (or ints) to MFs, so there aren’t so many float (or int) constants in my program?  I know it’s not typesafe. I am not really sure what’s causing the problem yet—It’s just dying on my larger models.  Possibly I will break out to a separate class if necessary.  So I will have java files like abox.MFVec3f11.java instead of keeping the methods in the same class.  What a mess!  I wonder if it’s possible to use inner classes, and escape the “too many constants” issue.  Hmm.

I don’t think Java was designed for this. LOL!  We are pushing the limits of reasonability.

Here is a link to a zip with the X3D file  I am dealing with.   Please don’t share.  Running the generated JavaScript file generates a route issue in X3DJSAIL, as far as I can tell.  I am not sure if I’ve tested this file with any other validator, but I’ll test it with X3D-Edit soon. 

http://coderextreme.net/john2.zip

John

Sent from Mail for Windows 10

From: yottzumm at gmail.com
Sent: Tuesday, April 18, 2017 6:21 AM
To: Don Brutzman
Cc: X3D Graphics public mailing list; Roy Walmsley; Alexander Kern
Subject: RE: second release: X3DJSAIL Java translations, javadoc inX3DExamplesArchives

Write one java program which loads a scenegraph java program, calls the scenegraph create function on the loaded program which returns the scenegraph, then loading program calls the scenegraph output function.  That way, you don’t have to put the output code each individual Java program (which is undesirable).  I hope you think this idea is better than putting output code in each java file (I just though of it).

I found XMLUnit too, but I didn’t use it.  I’m still doing the JavaScript thing.

Sent from Mail for Windows 10

From: Don Brutzman
Sent: Tuesday, April 18, 2017 3:45 AM
To: yottzumm at gmail.com
Cc: X3D Graphics public mailing list; Roy Walmsley; Alexander Kern
Subject: Re: second release: X3DJSAIL Java translations, javadoc inX3DExamples Archives

On 4/17/2017 10:47 PM, yottzumm at gmail.com wrote:
> Great effort Don, I hope I helped in some small way (heh, heh, waiting for a replacement computer now).

Thanks John you have helped tons.  Identifying bugs and experimenting with design patterns is totally important and has greatly accelerated our progress, on multiple topics simultaneously.

> I am anxious to look at your output Java code/X3dToJava.xslt to see how I can fix the runtime bugs I encountered.

Each java file is individually inspectable now in the online archives, just like .json versions.

Are you differencing the output of Java against original XML yet?  That would certainly be good test to add.

Agreed that would be good to add to the build scripts, .x3d via .xslt to .java, compiled, and then runtime serialization back out to .x3d.  Every round trip adds multiple QA checks... also a great way to find holes in code.
  

Have looked for Ant-based XML-diff (or plain-diff) tools, haven't found a native task or seen anything custom that stands out yet.  Suggestions welcome... hey wait a minute, this should work well:

                XMLUnit - Unit Testing XML for Java and .NET
                http://www.xmlunit.org
                "XMLUnit for Java 2.3.0 has been released on 2016-11-12, XMLUnit.NET 2.3.1 has been released on 2017-03-23."

Also, just noticed that Ant received an upgrade to v10.1 for Java8 about 10 weeks ago, will look at upgrading to that.  That community is extremely careful and thorough with Ant upgrades so it is likely very well tested.

btw have a hunch about how to handle the java-compilation "code too big" error in example scenes (that generate a method > 64K) when using XSLT.  The tail-recursion pattern can only returns a single string from each node and its children.  The stylesheet console logs reveal that the XSLT is already diagnosing large string values OK already.  Am thinking that I will surround long data structures with delimiters as it proceeds, keeping them inline, then upon completed generation will use the embedded delimiters to split that big comprehensive call into data structures plus call.  Of course, similar to your approach, will also have to come up with a good naming mechanism for those data structures too.  Stay tuned, i should be able to tackle that in another weekend or two.

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/20170418/24c86cb2/attachment-0001.html>


More information about the x3d-public mailing list