[x3d-public] Broken X3dToJava.xslt stylesheet

yottzumm at gmail.com yottzumm at gmail.com
Sun Apr 9 04:10:18 PDT 2017


I had to make the following changes to HelloWorldProgramOutput.java to make it compile.    The stylesheet doesn’t produce valid Java.

diff HelloWorldProgramOutput.old.java HelloWorldProgramOutput.java
176c176
<           .setGeometry(new BoxObject("test-NMTOKEN_regex.0123456789").setClass("textured")))))
---
>           .setGeometry(new BoxObject("test-NMTOKEN_regex.0123456789").setCssClass("textured")))))
284c284
<           .setMaterial(new ProtoInstanceObject("MyMaterialModulator").setDEF("MyMaterialModulator").setName("MaterialModulator"))
---
>           .setMaterial(new ProtoInstanceObject().setName("MyMaterialModulator").setDEF("MyMaterialModulator").setName("MaterialModulator"))
289,293c289
<     .addComments(" Test success: x3dModel.findNodeByDEF(DeclarativeAppearanceExample) = <Appearance DEF='DeclarativeAppearanceExample'/> i.e.
< <Appearance DEF='DeclarativeAppearanceExample'>
<     <ProtoInstance DEF='MyMaterialModulator' name='MaterialModulator' containerField='material'/>
<     <!- - DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance - ->
< </Appearance> ")
---
>     .addComments(" Test success: x3dModel.findNodeByDEF(DeclarativeAppearanceExample) = <Appearance DEF='DeclarativeAppearanceExample'/> i.e.  <Appearance DEF='DeclarativeAppearanceExample'> <ProtoInstance DEF='MyMaterialModulator' name='MaterialModulator' containerField='material'/> <!- - DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance - -> </Appearance> ")
In addition, the result program doesn’t pass muster when running it:

Exception in thread "main" org.web3d.x3d.sai.InvalidFieldException: Illegal addFieldValue() invocation for ProtoInstanceObject name='ArtDeco01' fieldValue name='description', newFieldValue.validation() failure:
   ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.
ErrorNotConnectedToSceneGraph, fieldValue is not connected to a scene graph and thus getType() cannot be checked.

        at org.web3d.x3d.jsail.Core.ProtoInstanceObject.addFieldValue(ProtoInstanceObject.java:1112)
        at HelloWorldProgramOutput.initialize(HelloWorldProgramOutput.java:238)
        at HelloWorldProgramOutput.<init>(HelloWorldProgramOutput.java:128)
        at HelloWorldProgramOutput.main(HelloWorldProgramOutput.java:369)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170409/164b0f1e/attachment-0001.html>


More information about the x3d-public mailing list