[x3d-public] potential error in X3dToJava.xslt (setLang not called for meta statements.

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Fri Nov 19 15:27:34 PST 2021


Apologies for link error.  As with 3900 other models in the X3D Examples Archive, the following page


  *   https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/TeapotIndex.html

includes many links to alternate autoconverted forms, including


  *   https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/Teapot.java


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 https:// faculty.nps.edu/brutzman

From: John Carlson <yottzumm at gmail.com>
Sent: Friday, November 19, 2021 2:10 PM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: Re: potential error in X3dToJava.xslt (setLang not called for meta statements.

I'm not finding:

https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/TeapotIndex.java<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fx3dgraphics.com%2Fexamples%2FX3dForAdvancedModeling%2FGeometricShapes%2FTeapotIndex.java&data=04%7C01%7Cbrutzman%40nps.edu%7C18bd277e63c1421d19f308d9aba955d7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637729566350740784%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=ErJcCzW3uD7%2BYcd3%2BVqbuhpA9QS3P%2FTmpJgXAivZoAw%3D&reserved=0>

So I assume you're working on this.

Thanks!

John
On 11/19/21 03:56, Brutzman, Donald (Don) (CIV) wrote:
Thanks for report. Not sure what change or problem you are reporting however.  Further you mention Teapot but then show another example, Mooring Buoy.  Hmmm.

I suspect that you are getting things like setDir("").setHttp_equiv("").setLang("").setScheme("") because you do not have Saxon invocation set to strip default attribute values.

Excerpt from https://x3dgraphics.com/examples/X3dForAdvancedModeling/build.xml<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fx3dgraphics.com%2Fexamples%2FX3dForAdvancedModeling%2Fbuild.xml&data=04%7C01%7Cbrutzman%40nps.edu%7C18bd277e63c1421d19f308d9aba955d7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637729566350750740%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=5BeY%2F60z4RxY216ORCAaonX85E4ccdf8zJbluMkpxv4%3D&reserved=0> showing invocation parameters

                        <!-- process individual files here. show full path to facilitate user loading, editing of reported files -->
                        <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d converted to ${name.short}.java</echo>
                        <!-- Saxon10 is locally defined macro -->
                        <Saxon10  scene="${relative.path1}/${relative.path2}/${name.short}"
                            stylesheet="${stylesheet.dir}/X3dToJava"
                        parameterPair1="packageName=${archive.name}.${relative.path1}${relative.path2}"
                        parameterPair2=  "className=${name.short}"
                        parameterPair3="includeLicense=true"
                                suffix=""
                             extension="java"
                                expand="on"/>
                        <!-- expand:on since DTD defaults needed -->
                                                                                          <!-- <echo message="... compiling ${name.short}.java"/> -->
                                                                                          <javac  srcdir="${relative.path1}/${relative.path2}/"
                                                                                                         includes="${name.short}.java"
                                                                                                         classpath="${x3djsail.stylesheets.dir}/${jsai.full.archive.jar.name}"
                                                                                                            destdir="${java.classes.dir}"
                                                                                                              debug="on"
                                                                                                            source="${java.source}"
                                                                                                            target="${java.target}"
                                                                                                            verbose="${javac.verbose}"
                                                                                                            failonerror="false"
                                                                                                            includeantruntime="false">

Anyway I'm not seeing what your seeing, here is my local test of Teapot:

* https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/TeapotIndex.html<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fx3dgraphics.com%2Fexamples%2FX3dForAdvancedModeling%2FGeometricShapes%2FTeapotIndex.html&data=04%7C01%7Cbrutzman%40nps.edu%7C18bd277e63c1421d19f308d9aba955d7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637729566350750740%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=MSR3RLKFbZfClJDE1UJFwNi4kiISnw%2BJdEjMb%2BqQKww%3D&reserved=0>
* https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/TeapotIndex.x3d<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fx3dgraphics.com%2Fexamples%2FX3dForAdvancedModeling%2FGeometricShapes%2FTeapotIndex.x3d&data=04%7C01%7Cbrutzman%40nps.edu%7C18bd277e63c1421d19f308d9aba955d7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637729566350760695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=7KWN9gFeQQJjVCq3cxctFml73TF5LQriluFG512Ywvw%3D&reserved=0>
* https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/TeapotIndex.java<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fx3dgraphics.com%2Fexamples%2FX3dForAdvancedModeling%2FGeometricShapes%2FTeapotIndex.java&data=04%7C01%7Cbrutzman%40nps.edu%7C18bd277e63c1421d19f308d9aba955d7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637729566350770658%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=R0kZFNLZPHFH6TtJUBTmRiYMaRWI3DCJQajgdGmngAg%3D&reserved=0>

ant -f C:\\x3d-code\\www.web3d.org\\x3d\\content\\examples\\X3dForAdvancedModeling<http://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling> processScenes.java
clean.RoundTrip:
ensuring any prior converted *RoundTrip*.* source files are cleaned out...
processScenes.java:
Verifying Apache Ant XML Catalog resolver classpath: C:\apache-ant-1.10.11\lib/xml-resolver-1.2.jar (84091 bytes)
versions:
ant -version
Apache Ant(TM) version 1.10.11 compiled on July 10 2021
java -version
openjdk version "16" 2021-03-16
OpenJDK Runtime Environment (build 16+36-2231)
OpenJDK 64-Bit Server VM (build 16+36-2231, mixed mode, sharing)
python -version
Python 3.9.7
saxon -? help
Saxon-HE 10.6J from Saxonica
Usage: see http://www.saxonica.com/documentation/index.html#!using-xsl/commandline<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.saxonica.com%2Fdocumentation%2Findex.html%23!using-xsl%2Fcommandline&data=04%7C01%7Cbrutzman%40nps.edu%7C18bd277e63c1421d19f308d9aba955d7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637729566350770658%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TdI0UDLjuQ4PI9Dltkibg%2FevEHdYQxcTqP40a8RfZgI%3D&reserved=0>
Format: net.sf.saxon.Transform options params
Options available: -? -a -catalog -config -cr -diag -dtd -ea -expand -explain -export -ext -im -init -it -jit -l -lib -license -m -nogo -now -ns -o -opt -or -outval -p -quit -r -relocate -repeat -s -sa -scmin -strip -t -T -target -TB -threads -TJ -Tlevel -Tout -TP -traceout -tree -u -val -versionmsg -warnings -x -xi -xmlversion -xsd -xsdversion -xsiloc -xsl -y --?
Use -XYZ:? for details of option XYZ
Params:
  param=value           Set stylesheet string parameter
  +param=filename       Set stylesheet document parameter
  ?param=expression     Set stylesheet parameter using XPath
  !param=value          Set serialization parameter

  ANT_HOME=C:\apache-ant-1.10.11
JAVA_HOME=C:\Program Files\Java\openjdk\jdk-16
PYTHONHOME=C:\Program Files\Python39
PYTHONPATH=C:\x3d-code\www.web3d.org\x3d\stylesheets\python\x3d<http://www.web3d.org/x3d/stylesheets/python/x3d>
Check for X3DJSAIL ${jsail.full.archive.jar.name} or X3DJSAIL.4.0.classes.jar
CLASSPATH=C:\x3d-code\www.web3d.org\x3d\stylesheets\java\jars\X3DJSAIL.4.0.full.jar<http://www.web3d.org/x3d/stylesheets/java/jars/X3DJSAIL.4.0.full.jar>;
javac source/target      $java.source=1.8
Java/JVM version    $ant.java.version=16
Java/JVM detail version $java.version=16
Ant version              $ant.version=Apache Ant(TM) version 1.10.11 compiled on July 10 2021
Check for node.js installation from https://nodejs.org<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnodejs.org%2F&data=04%7C01%7Cbrutzman%40nps.edu%7C18bd277e63c1421d19f308d9aba955d7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637729566350780614%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=lUzGfJEz38fVlFizHhagCrcCFOCrCHSkJxEI%2Fpr9FRs%3D&reserved=0>
v14.17.6
lib/X3DJSAIL.4.0.full.jar -version
X3DJSAIL version date: 12 October 2021
Configuration settings:  https://savage.nps.edu/Savage/developers.html
===========================================
C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForAdvancedModeling/GeometricShapes//Teapot.x3d<http://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/Teapot.x3d> converted to Teapot.java
Compiling 1 source file to C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForAdvancedModeling\classes<http://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/classes>
now run and validate the java model
java -classpath classes;../../../stylesheets/java/jars/X3DJSAIL.4.0.full.jar X3dForAdvancedModeling.GeometricShapes.Teapot
Java program "X3dForAdvancedModeling.GeometricShapes.Teapot" self-validation test results: success
===================================
echo.timestamp:
timestamp 01:36:46 on 19 November 2021
processScenes.java complete.
BUILD SUCCESSFUL (total time: 5 seconds)



all the best, Don
--
Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu<mailto:brutzman at nps.edu>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149
X3D graphics, virtual worlds, navy robotics https:// faculty.nps.edu/brutzman

From: John Carlson <yottzumm at gmail.com><mailto:yottzumm at gmail.com>
Sent: Thursday, November 18, 2021 2:31 AM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu><mailto:brutzman at nps.edu>; X3D Graphics public mailing list <x3d-public at web3d.org><mailto:x3d-public at web3d.org>
Subject: potential error in X3dToJava.xslt (setLang not called for meta statements.


Before/after difference in Teapot.java.



diff --git a/src/main/java/net/x3djsonld/data/Teapot.java b/src/main/java/net/x3djsonld/data/Teapot.java
index a9fdb5619..3ad954bd0 100644
--- a/src/main/java/net/x3djsonld/data/Teapot.java
+++ b/src/main/java/net/x3djsonld/data/Teapot.java
@@ -88,16 +88,16 @@ public class Teapot
       {
  x3dModel = new X3D().setProfile(X3D.PROFILE_INTERCHANGE).setVersion(X3D.VERSION_3_0)
  .setHead(new head()
-    .addMeta(new meta().setName(meta.NAME_TITLE      ).setContent("Teapot.x3d").setDir("").setHttp_equiv("").setLang("").setScheme(""))
-    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("A mooring buoy used in Naval Harbors").setDir("").setHttp_equiv("").setLang("").setScheme(""))
-    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("LT Patrick Sullivan").setDir("").setHttp_equiv("").setLang("").setScheme(""))
-    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("28 July 2006").setDir("").setHttp_equiv("").setLang("").setScheme(""))
-    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("12 January 2014").setDir("").setHttp_equiv("").setLang("").setScheme(""))
-    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://savage.nps.edu/Savage/HarborEquipment/Buoys/MooringBuoy.x3d"<https://savage.nps.edu/Savage/HarborEquipment/Buoys/MooringBuoy.x3d>).setDir("").setHttp_equiv(""
).setLang("").setScheme(""))
-    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("VizX3D, http://www.vivaty.com/downloads/studio<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vivaty.com%2Fdownloads%2Fstudio&data=04%7C01%7Cbrutzman%40nps.edu%7C18bd277e63c1421d19f308d9aba955d7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637729566350790562%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KDAYITwDwhjPATQk1Vbxmu6OcdM4saBEKb1jduzbJfI%3D&reserved=0>").setDir("").setHttp_equiv("").setLang("").setSche
me(""))
-    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("Wings3D, http://www.wings3d.com<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.wings3d.com%2F&data=04%7C01%7Cbrutzman%40nps.edu%7C18bd277e63c1421d19f308d9aba955d7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637729566350800517%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KtrNc1Dr2SvWVk28P7nozv5SLFpQ95mogC7%2BDOuQcu4%3D&reserved=0>").setDir("").setHttp_equiv("").setLang("").setScheme(""))
-    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("X3D-Edit, https://savage.nps.edu/X3D-Edit").setDir("").setHttp_equiv("").setLang("").setScheme(""
))
-    .addMeta(new meta().setName(meta.NAME_LICENSE    ).setContent("../../license.html").setDir("").setHttp_equiv("").setLang("").setScheme("")))
+    .addMeta(new meta().setName(meta.NAME_TITLE      ).setContent("Teapot.x3d").setDir("").setHttp_equiv("")/* xml:lang='' */.setScheme(""))
+    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("A mooring buoy used in Naval Harbors").setDir("").setHttp_equiv("")/* xml:lang='' */.setScheme(""
))
+    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("LT Patrick Sullivan").setDir("").setHttp_equiv("")/* xml:lang='' */.setScheme(""))
+    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("28 July 2006").setDir("").setHttp_equiv("")/* xml:lang='' */.setScheme(""))
+    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("12 January 2014").setDir("").setHttp_equiv("")/* xml:lang='' */.setScheme(""))
+    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://savage.nps.edu/Savage/HarborEquipment/Buoys/MooringBuoy.x3d"<https://savage.nps.edu/Savage/HarborEquipment/Buoys/MooringBuoy.x3d>).setDir("").setHttp_equiv(""
)/* xml:lang='' */.setScheme(""))
+    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("VizX3D, http://www.vivaty.com/downloads/studio<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vivaty.com%2Fdownloads%2Fstudio&data=04%7C01%7Cbrutzman%40nps.edu%7C18bd277e63c1421d19f308d9aba955d7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637729566350800517%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zWvImOSRwmKqcpjMw%2FkHl6s8nNZDsjFcNML1%2FsY%2BSO0%3D&reserved=0>").setDir("").setHttp_equiv("")/* xml:lang='' */.se
tScheme(""))
+    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("Wings3D, http://www.wings3d.com<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.wings3d.com%2F&data=04%7C01%7Cbrutzman%40nps.edu%7C18bd277e63c1421d19f308d9aba955d7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637729566350810481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=hhRtwpPhKmrX0XQKXnXRVGcymqwoWqdBFPtJ0LX60kM%3D&reserved=0>").setDir("").setHttp_equiv("")/* xml:lang='' */.setScheme(""))
+    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("X3D-Edit, https://savage.nps.edu/X3D-Edit").setDir("").setHttp_equiv("")/* xml:lang='' */.setSche
me(""))
+    .addMeta(new meta().setName(meta.NAME_LICENSE    ).setContent("../../license.html").setDir("").setHttp_equiv("")/* xml:lang='' */.setScheme("")))
  .setScene(new Scene()
    .addChild(new Transform().setScale(0.3,0.3,0.3)
      .addChild(new Group("MooringBuoyWithHook")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211119/e98e83e8/attachment-0001.html>


More information about the x3d-public mailing list