<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>"The overall json build log looks pretty clean to me.  Link and excerpt follow"  Why not actually test the JSON output from x3d.py with standard ECMAScript or even better, standard python packages?</div><div><br></div><div>The Emperor has no clothes! The x3d.py output JSON fails at jshint, node.js, jsonlint and JSON Schema, if you would use them.  But the JSON is not right, it's WIP, as I said, not even passing JSON standards, ignoring any JSON Schema stuff!  I'm going to keep on promoting x3d-tidy.  I'm guessing you're pretty afraid to run the python generated from 4000 examples.  Why not just try HelloWorldProgramOutput*.py? Yes, you have to change it to emit JSON, of course!  Let me give you a hint...use JSON from inside python for a quick smoke test! No, print(prependLineNumbers(newModelVRML, err.lineno)) isn't testing JSON validation.</div><div><br></div><div>Here's how to test JSON (not JSON schema, that's way too slow) in python:</div><div><br></div><div><a href="https://www.w3schools.com/python/python_json.asp">https://www.w3schools.com/python/python_json.asp</a><br></div><div><br></div><div>I will update my NetBeans to : <a href="https://github.com/apache/netbeans/releases/tag/19-rc4">https://github.com/apache/netbeans/releases/tag/19-rc4</a> after I send this message.</div><div><br></div><div>Details below:</div><div><br></div><div><br></div><div dir="ltr">Comparing:<div><br></div><div><a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.py" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.py</a><br></div><div><br></div><div>to:</div><div><br></div><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/net/x3djsonld/data/HelloWorldProgramOutput.py" target="_blank">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/net/x3djsonld/data/HelloWorldProgramOutput.py</a> (using my version of Don's stylesheet).<br></div><div><br></div><div>I see a difference in indentation, which means the stylesheet change, probably within the last month, will check.</div><div><br></div><div><div>~/X3DJSONLD/src/main/lib/stylesheets</div><div>$ ls -ltr !*</div><div>ls -ltr X3dToPython.xslt /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/X3dToPython.xslt" target="_blank">www.web3d.org/x3d/stylesheets/X3dToPython.xslt</a></div><div>-rw-r--r-- 1 john 197121 215215 Jul 18 10:25 /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/X3dToPython.xslt" target="_blank">www.web3d.org/x3d/stylesheets/X3dToPython.xslt</a></div><div>-rw-r--r-- 1 john 197121 215215 Jul 29 05:35 X3dToPython.xslt</div></div><div><br></div><div>(no differences either).   So what's up?  Here's where I get my stylesheet from AFAIK:</div><div><br></div><div><br></div><div><br></div><div><a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3dToPython.xslt" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3dToPython.xslt</a></div><div><br></div><div>(Is there a better repository? Seems hidden?  I see X3D-Edit on Web3d Consortium's github, let me try that--not seeing any significant difference, but I'm not using Python inside NetBeans yet.   </div><div><br></div>How do I see if I have an up to date X3D-Edit?  Will try to download. What is Apache NetBeans 19????  Ah, a release candidate... Please update your Apache 19 links here, <a href="https://savage.nps.edu/x3d-edit/">https://savage.nps.edu/x3d-edit/</a>  to point here: <a href="https://github.com/apache/netbeans/releases">https://github.com/apache/netbeans/releases</a> (plus all mention of NetBeans 18 on the X3D-Edit site), not here: <a href="https://savage.nps.edu/Savage/developers.html#NetBeans">https://savage.nps.edu/Savage/developers.html#NetBeans</a></div><div dir="ltr"><br></div><div dir="ltr"><br><div><img src="cid:ii_llb5w87a0" alt="image.png" width="443" height="528"><br></div><div><br></div><div>Here's the X3D-Edit about:</div><div><br></div><div><img src="cid:ii_llb5xf741" alt="image.png" width="528" height="353"><br></div><div><br></div><div><br>Here's where I found the link:</div><div><br></div><div><a href="https://www.web3d.org/x3d/stylesheets/python/python.html" target="_blank">https://www.web3d.org/x3d/stylesheets/python/python.html</a><br></div><div><br></div><div><div>$ cp /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.x3d" target="_blank">www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.x3d</a> ../d</div><div>ata/</div></div><div><br></div><div><div>~/X3DJSONLD/src/main/shell (master)</div><div>$ bash don.sh ../data/HelloWorldProgramOutput.x3d</div></div><div><br></div><div>Investigating output code:</div><div><br></div><div><div>$ git diff HelloWorldProgramOutput.py</div><div>warning: in the working copy of 'src/main/python/net/x3djsonld/data/HelloWorldProgramOutput.py', LF will be replaced by CRLF the next time Git touches it</div><div>diff --git a/src/main/python/net/x3djsonld/data/HelloWorldProgramOutput.py b/src/main/python/net/x3djsonld/data/HelloWorldProgramOutput.py</div><div>index 2d6ce6199..f3e166e20 100644</div><div>--- a/src/main/python/net/x3djsonld/data/HelloWorldProgramOutput.py</div><div>+++ b/src/main/python/net/x3djsonld/data/HelloWorldProgramOutput.py</div><div>@@ -1,6 +1,10 @@</div><div> ####################################################################################################</div><div> #</div><div>-# Now available: developmental python x3d.py package on PyPI for import.</div><div>+# Invoking X3D model self-test:</div><div>+#</div><div>+#   $ python HelloWorldProgramOutput.py</div><div>+#</div><div>+# Python package x3d.py package is available on PyPI for import.</div><div> #   This approach simplifies Python X3D deployment and use.</div><div> #   <a href="https://pypi.org/project/x3d" target="_blank">https://pypi.org/project/x3d</a></div><div> #</div><div>@@ -9,7 +13,7 @@</div><div> # or</div><div> #       python -m pip install x3d</div><div> #</div><div>-# Developer options for loading x3d package:</div><div>+# Developer options for loading x3d package in other Python programs:</div><div> #</div><div> #    from x3d import *  # preferred approach, terser source that avoids x3d.* class prefixes</div><div> #</div><div>@@ -46,7 +50,7 @@ newModel=X3D(class_='x3dModel.class',id_='x3dModel.id',profile='Full',style_='x3</div><div>     meta(content='<a href="https://www.web3d.org/specifications/java/X3DJSAIL.html" target="_blank">https://www.web3d.org/specifications/java/X3DJSAIL.html</a>',name='reference'),</div><div>     meta(content='HelloWorldProgramOutput.java',name='generator'),</div><div>     meta(content='6 September 2016',name='created'),</div><div>-    meta(content='3 July 2023',name='modified'),</div><div>+    meta(content='30 July 2023',name='modified'),</div><div>     meta(content='X3D Java Scene Access Interface Library (X3DJSAIL)',name='generator'),</div><div>     meta(content='<a href="https://www.web3d.org/specifications/java/examples/HelloWorldProgram.java" target="_blank">https://www.web3d.org/specifications/java/examples/HelloWorldProgram.java</a>',name='generator'),</div><div>     meta(content='Netbeans <a href="https://www.netbeans.org" target="_blank">https://www.netbeans.org</a>',name='generator'),</div></div><div><br></div><div>No significant changes.</div><div><br></div><div>So let's look at the code:</div><div><br></div><div><div>try:</div><div>#   print('check newModel.JSON() serialization...')</div><div>    newModelJSON=newModel.JSON() # test export method JSON() for exceptions during export</div><div>#   print(prependLineNumbers(newModelJSON)) # debug</div><div>   <font color="#ff0000"> print("Python-to-JSON export of JSON output successful (under development)")</font></div><div>except Exception as err: # usually SyntaxError</div><div>    print("*** Python-to-JSON export of JSON output failed:", type(err).__name__, err)</div><div>    if newModelJSON: # may have failed to generate</div><div>        print(prependLineNumbers(newModelJSON,err.lineno))</div></div><div><br></div><div>So let's try running it:</div><div><br></div><div><div>py HelloWorldProgramOutput.py</div><div>x3d.py package 4.0.64.4 loaded, have fun with X3D Graphics!</div><div>Self-test diagnostics for HelloWorldProgramOutput.py:</div><div>meta information, info: continued development and testing in progress</div><div>*** Python-to-XML well-formed XML document test failed.</div><div>    x3dSchemaUrl=<a href="https://www.web3d.org/specifications/x3d-4.0.xsd" target="_blank">https://www.web3d.org/specifications/x3d-4.0.xsd</a></div><div>    XMLSchemaParseError cannot import namespace '<a href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a>': Entities are forbidden (entity_name='dsig')</div><div>Python-to-VRML export of VRML output successful</div><div><font color="#ff0000">Python-to-JSON export of JSON output successful (under development)</font></div><div>python HelloWorldProgramOutput.py load and self-test diagnostics complete.</div></div><div><br></div><div>So yes, a WIP as I said.  I don't even think Don's tests actually produce JSON output that can be validated with jshint, node.js, jsonlint, JSON Schema, or any other JSON Parser or ECMAScript/JavaScript environment!  So let's dig and investigate this.</div><div><br></div><div><div>diff hey.py HelloWorldProgramOutput.py</div><div>414d413</div><div><     print(newModelJSON)</div></div><div><br></div><div><div>$ py hey.py >hey.json</div><div><br></div><div>$ vi hey.json # to take off header x3d.py doesn't write to standard error.</div></div><div><br></div><div><div>$ jsonlint hey.json</div><div>Error: Parse error on line 2:</div><div>        "e,</div><div>------------^</div><div>Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got ','</div><div>    at Object.parseError (C:\Users\john\AppData\Roaming\npm\node_modules\jsonlint\lib\jsonlint.js:55:11)</div><div>    at Object.parse (C:\Users\john\AppData\Roaming\npm\node_modules\jsonlint\lib\jsonlint.js:132:22)</div><div>    at parse (C:\Users\john\AppData\Roaming\npm\node_modules\jsonlint\lib\cli.js:82:14)</div><div>    at main (C:\Users\john\AppData\Roaming\npm\node_modules\jsonlint\lib\cli.js:135:14)</div><div>    at Object.<anonymous> (C:\Users\john\AppData\Roaming\npm\node_modules\jsonlint\lib\cli.js:179:1)</div><div>    at Module._compile (node:internal/modules/cjs/loader:1233:14)</div><div>    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)</div><div>    at Module.load (node:internal/modules/cjs/loader:1091:32)</div><div>    at Module._load (node:internal/modules/cjs/loader:938:12)</div><div>    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)</div></div><div><br></div><div>Also, make these changes to you python generated programs for actually testing JSON:</div><div><br></div><div><div>$ diff HelloWorldProgramOutput.py hey.py</div><div>0a1,3</div><div>> import json</div><div>></div><div>></div><div>413a417</div><div>>     json.loads(newModelJSON)</div><div><br></div><div>john@DESKTOP-8OPL3IE MINGW64 ~/X3DJSONLD/src/main/python/net/x3djsonld/data (master)</div><div>$ py hey.py</div><div>x3d.py package 4.0.64.4 loaded, have fun with X3D Graphics!</div><div>Self-test diagnostics for HelloWorldProgramOutput.py:</div><div>meta information, info: continued development and testing in progress</div><div>*** Python-to-XML well-formed XML document test failed.</div><div>    x3dSchemaUrl=<a href="https://www.web3d.org/specifications/x3d-4.0.xsd">https://www.web3d.org/specifications/x3d-4.0.xsd</a></div><div>    XMLSchemaParseError cannot import namespace '<a href="http://www.w3.org/2000/09/xmldsig#">http://www.w3.org/2000/09/xmldsig#</a>': Entities are forbidden (entity_name='dsig')</div><div>Python-to-VRML export of VRML output successful</div><div>*** Python-to-JSON export of JSON output failed: JSONDecodeError Expecting value: line 2 column 11 (char 12)</div><div>*** issue in line 2 of 1226 ***</div><div>[ 1] {</div><div>[ 2]     "X3D":,</div><div>[ 3]     {</div><div>[ 4]         "encoding":"UTF-8",</div><div>[ 5]         "$id":   "<a href="https://www.web3d.org/specifications/x3d-4.0-JSONSchema.json">https://www.web3d.org/specifications/x3d-4.0-JSONSchema.json</a>",</div><div><br></div><div>python HelloWorldProgramOutput.py load and self-test diagnostics complete.</div></div><div><br></div><div>I know you don't want any imports in x3d.py, but at least have them there for testing!  My word! At least try them, to see if they work without any downloads using pip.</div><div><br></div><div><br></div><div>$ cp hey.json ~/x3dvalidate/examples/hey.json<br></div><div><br></div><div>$ cd ~/x3dvalidate/<br></div><div><br></div><div><div>$ node examples/hey.json</div><div>node:internal/modules/cjs/loader:1305</div><div>    throw err;</div><div>    ^</div><div><br></div><div>SyntaxError: C:\Users\john\x3dvalidate\examples\hey.json: Unexpected token ',', ..."    "X3D"</div><div>:,</div><div>    {</div><div>"... is not valid JSON</div><div>    at parse (<anonymous>)</div><div>    at Module._extensions..json (node:internal/modules/cjs/loader:1302:39)</div><div>    at Module.load (node:internal/modules/cjs/loader:1091:32)</div><div>    at Module._load (node:internal/modules/cjs/loader:938:12)</div><div>    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)</div><div>    at node:internal/main/run_main_module:23:47</div><div><br></div><div>Node.js v20.4.0</div></div><div><br></div><div>$ node x3dvalidate.js examples/hey.json<br></div><div>(similar output)</div><div><br></div><div>So let's actually edit the code..</div><div><br></div><div>$ cp examples/hey.json examples/heynew.json<br></div><div><br></div><div>I'm confused!</div><div><br></div><div>I see:</div><div><br></div><div><div>        "meta":</div><div>        {</div><div>      {</div><div>        "@content":"continued development and testing in progress",</div><div>        "@name":"info"</div><div>      }</div><div>    },</div></div><div><br></div><div>X3dToJson.xslt produces:</div><div><br></div><div><div>        "meta": [</div><div>          {</div><div>            "@name":"title",</div><div>            "@content":"HelloWorldProgramOutput.x3d"</div><div>          },</div><div>          {</div><div>            "@name":"info",</div><div>            "@content":"continued development and testing in progress"</div><div>          },</div></div><div><br></div><div><br></div><div>Whereas hey.json contains:</div><div><br></div><div><div>        "meta":</div><div>        {</div><div>      {</div><div>        "@content":"HelloWorldProgramOutput.x3d",</div><div>        "@name":"title"</div><div>      }</div><div>    },</div><div>        "meta":</div><div>        {</div><div>      {</div><div>        "@content":"continued development and testing in progress",</div><div>        "@name":"info"</div><div>      }</div><div>    },</div></div><div><br></div><div><br></div><div>Why don't we have a JSON standard yet?  Anyone can claim they have X3D JSON, even if their output isn't valid JSON! Their own tools don't even have to agree!</div><div><br></div><div>I've already cleaned up the JSON header in X3dToPython.xslt.  I haven't gotten farther than that!</div><div><br></div><div>See zip updates X3duomToX3dPythonPackage.xslt previously sent.  That at least fixes the meta statement issues, I'm fairly sure.</div><div><br></div><div>Excellent work on X3DJSAIL, Don.  Please don't go around claiming x3d.py creates valid, verifiable JSON. I know you didn't.  I will check the new release version of NetBeans and see if I'm wrong and there's some secret, new version of x3d.py. Note that <a href="https://www.web3d.org/x3d/stylesheets/python/python.html">https://www.web3d.org/x3d/stylesheets/python/python.html</a> points to NetBeans 18!</div><div><br></div><div>John</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3dToPython.xslt" target="_blank"></a><br><br></div><div><br></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 13, 2023 at 9:29 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div lang="EN-US"><div><p class="MsoNormal">x3d.py methods for JSON match the patterns listed in our documentation for this suggested encoding.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li style="margin-left:0in">X3D to JSON Stylesheet Converter<u></u><u></u></li><li style="margin-left:0in">The X3D to JSON stylesheet converts .x3d XML to .json, supporting the forthcoming JSON Encoding for X3D Graphics.<u></u><u></u></li><li style="margin-left:0in"><a href="https://www.web3d.org/x3d/stylesheets/X3dToJson.html" target="_blank">https://www.web3d.org/x3d/stylesheets/X3dToJson.html</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">So do all of the 4,000 autogenerated examples in our X3D Example Archives.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li style="margin-left:0in">X3D Resources, Examples: Scene Archives for X3D<u></u><u></u></li><li style="margin-left:0in"><a href="https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples" target="_blank">https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The overall json build log looks pretty clean to me.  Link and excerpt follow<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li style="margin-left:0in"><a href="https://www.web3d.org/x3d/content/examples/build.json.all.log.txt" target="_blank">https://www.web3d.org/x3d/content/examples/build.json.all.log.txt</a><u></u><u></u></li><li style="margin-left:0in"><a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/build.json.all.log.txt" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/build.json.all.log.txt</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">X3D examples: X3dForAdvancedModeling.processScenes.json:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">C:\x3d-code\<a href="http://www.web3d.org" target="_blank">www.web3d.org</a>\x3d\content\examples\X3dForAdvancedModeling/AdditiveManufacturing//CaffeinePubChem2519SticksColor.x3d processing with X3dToJson stylesheet<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">C:\x3d-code\<a href="http://www.web3d.org" target="_blank">www.web3d.org</a>\x3d\content\examples\X3dForAdvancedModeling/AdditiveManufacturing//CaffeinePubChem2519SticksColor.json validation checking with jslint<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">C:\x3d-code\<a href="http://www.web3d.org" target="_blank">www.web3d.org</a>\x3d\content\examples\X3dForAdvancedModeling/AdditiveManufacturing//CaffeinePubChem2519SticksColor.json validation checking with json-schema-validator<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">... does not support latest JSON Schema, this test is not yet usable<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">By the way, your mention of “x3d-tidy” still seems misnamed since we already have one, for a few years now…<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li style="margin-left:0in">X3D Tidy for Scene Cleanup, Corrections and Modifications<u></u><u></u></li><li style="margin-left:0in">X3D Tidy is an XSLT stylesheet that checks for simple authoring difficulties in X3D scenes and fixes them.<u></u><u></u></li><li style="margin-left:0in"><a href="https://www.web3d.org/x3d/stylesheets/X3dTidy.html" target="_blank">https://www.web3d.org/x3d/stylesheets/X3dTidy.html</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Have fun with X3D using Python and JSON!  8)<u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">all the best, Don<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">-- <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">X3D graphics, virtual worlds, navy robotics <a href="https://faculty.nps.edu/brutzman" target="_blank">https://faculty.nps.edu/brutzman</a><u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> x3d-public <<a href="mailto:x3d-public-bounces@web3d.org" target="_blank">x3d-public-bounces@web3d.org</a>> <b>On Behalf Of </b>John Carlson<br><b>Sent:</b> Sunday, August 13, 2023 2:37 PM<br><b>To:</b> GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>><br><b>Cc:</b> X3D Public Mailing List (<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>) <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br><b>Subject:</b> Re: [x3d-public] VRML97 and ClassicVRML model validation from command line using view3dscene<u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">AFAIK, JSON output with x3d.py is still a work in progress.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">x3d-tidy should have .x3dj (JSON) I/O, see:<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal"><a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fx3d-&data=05%7C01%7Cbrutzman%40nps.edu%7Cf9f531f61f1146f6d8b008db9c4592c1%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638275594856167951%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=1bc06Bv4xzzI7qjNya6viyy5NP9vBLNcrvzY%2By5n8VM%3D&reserved=0" target="_blank">https://www.npmjs.com/package/x3d-</a><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">you use it with npx,<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">like<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">$ npx x3d-tidy -i file.x3dv -o file.x3dj<u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I’m trying to figure out why x3dvalidate doesn’t publish properly (maybe it does).  Anyway, when used with npx, parameters are not accepted.  If you want to have a copy in your project, it’s available here:<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal"><a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcoderextreme%2Fx3dvalidate&data=05%7C01%7Cbrutzman%40nps.edu%7Cf9f531f61f1146f6d8b008db9c4592c1%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638275594856167951%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=S8Ms6xLnZ8FE4EEcm0PGz3229OjC2vJHpSpCMY5Gao0%3D&reserved=0" target="_blank">https://github.com/coderextreme/x3dvalidate</a><u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">That should work ok<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div><div><div><div><div><p class="MsoNormal">On Sun, Aug 13, 2023 at 12:48 PM GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>> wrote:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><p class="MsoNormal">Related: if/once import functions are made for X3D.py, then exports to x3dv, x3d, html, json can be done from there.<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Sun, Aug 13, 2023 at 9:54 AM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><div><div><p class="MsoNormal">Hi Michalis.  Thanks for all of your immense, continuing work.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I am hoping to add validation of converted .wrl and .x3dv files to the regression test suite for X3D Example Archives.  This will check the quality of output from the X3dToVrml.xslt stylesheets, and improve the quality assurance (QA) of all VRML models offered there – over 4000 in each case. In each case I’ll create and commit a build.log text file so that we can keep track of compliance and progress.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><ul type="disc"><li class="MsoNormal">X3D Resources, Examples: Scene Archives for X3D<u></u><u></u></li><li class="MsoNormal"><a href="https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples" target="_blank">https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples</a><u></u><u></u></li></ul><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">To do so, am thinking that command-line invocation (CLI) of your <i>view3dscene</i> or <i>tovrmlx3d</i> executable tools can be accomplished through addition to the existing Ant build.xml scripts.  Am keen to proceed with that task.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Am looking through the view3dscene CLI documentation, but am not exactly sure how to accomplish this.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><ul type="disc"><li class="MsoNormal">view3dscene, 4. Command-line options<u></u><u></u></li><li class="MsoNormal"><a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcastle-engine.io%2Fview3dscene.php%23section_command_line_options&data=05%7C01%7Cbrutzman%40nps.edu%7Cf9f531f61f1146f6d8b008db9c4592c1%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638275594856167951%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=LijWonezwvWZ39NSfrz9Zggq6k56pjQeImgcRkGMUxs%3D&reserved=0" target="_blank">https://castle-engine.io/view3dscene.php#section_command_line_options</a><u></u><u></u></li></ul><p class="MsoNormal"> <u></u><u></u></p><ul type="disc"><li class="MsoNormal">view3dscene, 4.2. Converting to X3D<u></u><u></u></li><li class="MsoNormal"><a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcastle-engine.io%2Fview3dscene.php%23section_converting&data=05%7C01%7Cbrutzman%40nps.edu%7Cf9f531f61f1146f6d8b008db9c4592c1%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638275594856167951%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zWbWuv%2FbTqJvsCIlO%2BVMCEr2d%2FvDdMsDG%2Bz7isNlC%2BE%3D&reserved=0" target="_blank">https://castle-engine.io/view3dscene.php#section_converting</a><u></u><u></u></li></ul><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Additional options needed, or not seen:<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><ol start="1" type="a"><li class="MsoNormal">Validation report only, plain text via console.  (Perhaps a -validate switch is a variation on your ---write switches.)<u></u><u></u></li><li class="MsoNormal">Avoid creation of additional files, if possible.  (I might send each output to a single temp file, but all that file writing will likely slow down the already-long overall process.)<u></u><u></u></li></ol><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Please advise if there is a way to invoke one of your tools to accomplish this.  CLI example will be helpful.  Thanks in advance for all guidance.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Have fun with VRML!   8)<u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New""> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">all the best, Don</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">-- </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Courier New"">X3D graphics, virtual worlds, navy robotics <a href="https://faculty.nps.edu/brutzman" target="_blank">https://faculty.nps.edu/brutzman</a></span><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p></div></div><p class="MsoNormal">_______________________________________________<br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><u></u><u></u></p></div></blockquote></div><p class="MsoNormal">_______________________________________________<br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><u></u><u></u></p></blockquote></div></div></div></div></div></div></blockquote></div>