<div dir="auto">ClassicVRML, batch parsing?</div><div dir="auto"><br></div><div dir="auto">I guess the primary thing to do is validate vrml examples against a hand-checked vrml grammar.  I think what you’re saying is, the standardized 3.3 grammar for ClassicVRML already works great in X3D-Edit.  Do i test with the check button?  Do we do hand-checks with each vrml file—can we batch up a set of files?  SHIFT-left mouse click?</div><div dir="auto"><br></div><div dir="auto">I fully realize that many tools provide some degree of parsing of VRML.  What i am asking for is batch validation.</div><div dir="auto"><br></div><div dir="auto">At this point, it seems like we’re trying to validate the X3D VRML grammar found in the 3.3 standard, either with tools or otherwise (vrml examples and human brains), and possibly upgrade to grammar for 4.0.</div><div dir="auto"><br></div><div dir="auto">If it’s possible to translate ClassicVRML to .x3d and then validate, that seems like a good path, if we add batching.</div><div dir="auto">——————</div><div dir="auto"><br></div><div dir="auto">ROUTEs and JSON</div><div dir="auto"><br></div><div dir="auto">I do remember when we dealt with JSON, we had to bring out ROUTEs from inner contexts, but I don’t remember the reason.</div><div dir="auto"><br></div><div dir="auto">For X3DJSONLD, all JSON based ROUTEs come from X3dToJson.xslt.  If you need to test JSON roundtrips of this stylesheet, let me know.</div><div dir="auto"><br></div><div dir="auto">Note, I have DOM2JSONSerializer.js, but it gets into deep recursion calls beyond my debugging capabilities at this point, so I can’t offer a solution there.  I can’t recall if I handled ROUTEs properly or not.</div><div dir="auto"><br></div><div dir="auto">I also think that X3dToJson.xslt may not working in some cases “IllegalChild… was getting generated on some JSON files, but these problems are not currently reproduced (try using a *recent* Saxon-JS in a web browser—the problem presented itself in a web browser is old versions of Saxon-CE, not the Java versions).</div><div dir="auto"><br></div><div dir="auto">I have gotten rid of the JSON files since I can’t regenerate them.</div><div dir="auto"><br></div><div dir="auto">Any additional X3dToJson.xslt problems swept under the carpet for now.  I may need to update the Saxon-JS on my website.  X3DJSONLD git push is currently not working, i may need to delete some build files from my repository.</div><div dir="auto"><br></div><div dir="auto">——</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 5, 2023 at 6:55 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div lang="EN-US" link="blue" vlink="purple" style="overflow-wrap: break-word;"><div><p class="MsoNormal">Simple summary of ROUTE conversions:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ol style="margin-top:0in" start="1" type="a"><li style="margin-left:0in">We will allow ROUTEs as children, as always intended.  <u></u><u></u></li><li style="margin-left:0in">If the ClassicVRML Grammar indeed needs modification, we will define that for Mantis and 2023 ClassicVRML revision.<u></u><u></u></li><li style="margin-left:0in">As soon as we reach consensus, we will ask converters to fix support for ROUTEs.<u></u><u></u></li></ol><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Quality assurance (QA) efforts are all focused on XML and X3DUOM mappings to different program languages. No need to autogenerate a ClassicVRML Grammar that exists and has pretty-much worked for the past quarter century (since 1997).  If we figure out and confirm an improvement, then wow + bravo everyone!!  If we determine that it is OK, we’ve learned more too.<u></u><u></u></p></div></div><div lang="EN-US" link="blue" vlink="purple" style="overflow-wrap: break-word;"><div><div><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><u style="font-family:"Courier New""></u> <u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- <u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank" style="font-family:"Courier New"">brutzman@nps.edu</a><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" target="_blank" style="font-family:"Courier New"">faculty.nps.edu/brutzman</a><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p></div><p class="MsoNormal"><u></u> <u></u></p><div><div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0in 0in;border-top-color:rgb(225,225,225)"><p class="MsoNormal"><b>From:</b> John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> <br><b>Sent:</b> Thursday, January 5, 2023 3:46 PM<br><b>To:</b> Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br><b>Cc:</b> Joseph D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>>; Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>>; Patrick Dähne <<a href="mailto:pdaehne@gmail.com" target="_blank">pdaehne@gmail.com</a>>; 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> VRML grammar generator. Was: Re: [x3d-public] [...] HAnim2 X3D4 BoxMan update: does ClassicVRML Grammar allows ROUTE in children?<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">While I tried to find an issue with the VRML grammar, and i had several misperceptions, and on review, i didn’t find any problems that just “popped out.”   Perhaps my dry eyes have worsened.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Perhaps we should provide generation of VRML grammar from X3DUOM, if not done already?  We can have thousands of checks of examples against VRML grammar, as you have said.   I have not kept track of VRML “stuff.”<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Your thoughts?  I know everyone (besides me) is busy.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I can even try to accomplish myself with existing grammar and X3DUOM.   I can try with writing Xslt first, and if that’s too burdensome, possibly start from the JSON schema generator and branch out.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Trying to make this as easy for someone to do as possible, can we make the right implementation choice?   What limitations?  Declarative implementations seem important.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I agree that supporting one-offs in X3D Validator is useful and we probably don’t want to support batch web-based validation at this time.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I have also researched “schema from example” and “grammar from example.”   It might be worth applying new AI research to this problem with the right prompt.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Maybe i should apply AI to the JSON schema.  Hmm!<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">John <u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Thu, Jan 5, 2023 at 11:01 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-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in;border-left-color:rgb(204,204,204)"><div><div><p>Patrick, thanks for these important insights.<u></u><u></u></p><p> <u></u><u></u></p><p>Am looking closely and tracing the grammar.  As you know, such grammars are very important because they formally and unambiguously describe what is allowed.  Also pretty tricky to follow!<u></u><u></u></p><p> <u></u><u></u></p><ul type="disc"><li>Extensible 3D (X3D) encodings, Part 2: Classic VRML encoding Annex A (normative), Grammar<u></u><u></u></li><li><a href="https://www.web3d.org/documents/specifications/19776-2/V3.3/Part02/grammar.html" target="_blank">https://www.web3d.org/documents/specifications/19776-2/V3.3/Part02/grammar.html</a><u></u><u></u></li></ul><p> <u></u><u></u></p><p>Am finding following excerpts of interest.  Hopefully addition of color-coding helps:<u></u><u></u></p><p style="margin-left:0.5in"> <u></u><u></u></p><ol start="1" type="a"><li><b><span style="color:rgb(84,130,53)">node </span></b>::=<u></u><u></u></li></ol><p style="margin-left:0.5in">  nodeTypeId { <b><span style="color:rgb(197,90,17)">nodeBody</span></b><span style="color:rgb(197,90,17)"> </span>} |<u></u><u></u></p><p style="margin-left:0.5in">  Script { scriptBody } |<u></u><u></u></p><p style="margin-left:0.5in">  ComposedShader {composedShaderBody} |<u></u><u></u></p><p style="margin-left:0.5in">  PackagedShader {packagedShaderBody} |<u></u><u></u></p><p style="margin-left:0.5in">  ShaderProgram {shaderProgramBody} ;<u></u><u></u></p><ol start="2" type="a"><li><b><span style="color:rgb(197,90,17)">nodeBody </span></b>::=<u></u><u></u></li></ol><p style="margin-left:0.5in">  <b><span style="color:red">nodeBodyElement</span></b> |<u></u><u></u></p><p style="margin-left:0.5in">  <b><span style="color:red">nodeBodyElement</span></b> <b><span style="color:rgb(197,90,17)">nodeBody</span></b><span style="color:rgb(197,90,17)"> </span>|<u></u><u></u></p><p style="margin-left:0.5in">  empty ;<u></u><u></u></p><p style="margin-left:0.5in"> <u></u><u></u></p><ol start="3" type="a"><li><span style="background-color:aqua;color:black">mfnodeValue</span> ::=<u></u><u></u></li></ol><p style="margin-left:0.5in">   <b><span style="color:rgb(255,51,204)">nodeStatement </span></b>|<u></u><u></u></p><p style="margin-left:0.5in">   [ ] |<u></u><u></u></p><p style="margin-left:0.5in">   [ <span style="background-color:fuchsia;color:black">nodeStatements</span> ] ;<u></u><u></u></p><p> <u></u><u></u></p><ol start="4" type="a"><li><span style="background-color:fuchsia;color:black">nodeStatements</span> ::=<u></u><u></u></li></ol><p style="margin-left:0.5in">  <b><span style="color:rgb(255,51,204)">nodeStatement</span></b> |<u></u><u></u></p><p style="margin-left:0.5in">  <b><span style="color:rgb(255,51,204)">nodeStatement</span></b> <span style="background-color:fuchsia;color:black">nodeStatements</span> ;<u></u><u></u></p><p> <u></u><u></u></p><ol start="5" type="a"><li><b><span style="color:rgb(255,51,204)">nodeStatement</span></b>::=<u></u><u></u></li></ol><p style="margin-left:0.5in">  <b><span style="color:rgb(84,130,53)">node</span></b><span style="color:rgb(84,130,53)"> </span>|<u></u><u></u></p><p style="margin-left:0.5in">  DEF nodeNameId <b><span style="color:rgb(84,130,53)">node</span></b><span style="color:rgb(84,130,53)"> </span>|<u></u><u></u></p><p style="margin-left:0.5in">  USE nodeNameId ;<u></u><u></u></p><p> <u></u><u></u></p><ol start="6" type="a"><li><b><span style="color:red">nodeBodyElement </span></b>::=<u></u><u></u></li></ol><p style="margin-left:0.5in">  initializeOnlyId fieldValue |<u></u><u></u></p><p style="margin-left:0.5in">  inputOutputId fieldValue |<u></u><u></u></p><p style="margin-left:0.5in">  initializeOnlyId IS initializeOnlyId |<u></u><u></u></p><p style="margin-left:0.5in">  inputOnlyId IS inputOnlyId |<u></u><u></u></p><p style="margin-left:0.5in">  outputOnlyId IS outputOnlyId |<u></u><u></u></p><p style="margin-left:0.5in">  inputOutputId IS inputOutputId |<u></u><u></u></p><p style="margin-left:0.5in">  <span style="background-color:yellow;color:black">routeStatement</span> |<u></u><u></u></p><p style="margin-left:0.5in">  protoStatement ;<u></u><u></u></p><p> <u></u><u></u></p><ol start="7" type="a"><li><span style="background-color:yellow;color:black">routeStatement</span> ::=<u></u><u></u></li></ol><p style="margin-left:0.5in">  <b>ROUTE</b> nodeNameId . outputOnlyId TO nodeNameId . inputOnlyId ;<u></u><u></u></p><p> <u></u><u></u></p><ol start="8" type="a"><li><i>statement</i> ::=<u></u><u></u></li></ol><p style="margin-left:0.5in">  <b><span style="color:rgb(255,51,204)">nodeStatement</span></b> |<u></u><u></u></p><p style="margin-left:0.5in">  importStatement |<u></u><u></u></p><p style="margin-left:0.5in">  exportStatement |<u></u><u></u></p><p style="margin-left:0.5in">  protoStatement |<u></u><u></u></p><p style="margin-left:0.5in">  <span style="background-color:yellow;color:black">routeStatement</span> ;<u></u><u></u></p><p> <u></u><u></u></p><ol start="9" type="a"><li>sfnodeValue ::=<u></u><u></u></li></ol><p style="margin-left:0.5in">  <b><span style="color:rgb(255,51,204)">nodeStatement </span></b>|<u></u><u></u></p><p style="margin-left:0.5in">  NULL ;<u></u><u></u></p><p style="margin-left:0.5in"> <u></u><u></u></p><p> <u></u><u></u></p><p>So it looks like there are several chains of interest as follows:<u></u><u></u></p><p> <u></u><u></u></p><ol start="1" type="1"><li><span style="background-color:aqua;color:black">mfnodeValue</span> > <span style="background-color:fuchsia;color:black">nodeStatements</span> > <b><span style="color:rgb(255,51,204)">nodeStatement</span></b> > <b><span style="color:rgb(84,130,53)">node </span></b>> nodeTypeId {<b><span style="color:rgb(197,90,17)"> nodeBody</span></b><span style="color:rgb(197,90,17)"> </span>} > <b><span style="color:red">nodeBodyElement</span></b> > <span style="background-color:yellow;color:black">routeStatement</span> > <b>ROUTE</b><u></u><u></u></li></ol><p style="margin-left:0.5in"> <u></u><u></u></p><ol start="2" type="1"><li>sfnodeValue > <b><span style="color:rgb(255,51,204)">nodeStatement </span>> </b>(etc. as shown immediately above in chain 1)<u></u><u></u></li></ol><p style="margin-left:0.25in"> <u></u><u></u></p><ol start="3" type="1"><li><i>statement</i> > <span style="background-color:yellow;color:black">routeStatement</span> > <b>ROUTE</b><u></u><u></u></li></ol><p> <u></u><u></u></p><p>From these three chains in ClassicVRML grammar, it appears logical to conclude that <b>ROUTE</b> is allowed to appear wherever an MFNode, SFNode or statement is allowed to appear.<u></u><u></u></p><p> <u></u><u></u></p><p>That would be a consistent match with the parent-child relationships defined in X3D XML Schema and DTD.<u></u><u></u></p><p> <u></u><u></u></p><p>Hopefully I have the chain of logic correct here.  All scrutiny and review is welcome, we definitely need to get this right.<u></u><u></u></p><p> <u></u><u></u></p><p>If there is any unintended omission in the Backus-Naur logic here, then great!  We can agree now on corrections, and fix any issues in this year’s expected update of the ClassicVRML encoding from X3D3 to X3D4.  Correction of converters can also proceed immediately upon achieving consensus.<u></u><u></u></p><p> <u></u><u></u></p><ul type="disc"><li>Wikipedia:  Backus-Naur form<u></u><u></u></li><li><a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FBackus-Naur_form&data=05%7C01%7Cbrutzman%40nps.edu%7Cb358dc688cae4c8421b408daef76faef%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638085591553880829%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KzgMBB%2F7DwoJbxm3aoofTIU%2F0Be6BiZ1r9Mnj8w%2F6Q4%3D&reserved=0" target="_blank">https://en.wikipedia.org/wiki/Backus-Naur_form</a><u></u><u></u></li></ul><p> <u></u><u></u></p><p>Again thanks for careful strictness, careful checking of model content is one of our greatest strengths.<u></u><u></u></p><p> <u></u><u></u></p><p>Have fun with ClassicVRML X3D!  8)<u></u><u></u></p><p> <u></u><u></u></p><p>all the best, Don<u></u><u></u></p><p>-- <u></u><u></u></p><p>Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><u></u><u></u></p><p>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<u></u><u></u></p><p>X3D graphics, virtual worlds, Navy robotics https:// <a href="http://faculty.nps.edu/brutzman" target="_blank">faculty.nps.edu/brutzman</a><u></u><u></u></p><p> <u></u><u></u></p><p>-----Original Message-----<br>From: x3d-public <<a href="mailto:x3d-public-bounces@web3d.org" target="_blank">x3d-public-bounces@web3d.org</a>> On Behalf Of Patrick Dähne<br>Sent: Thursday, January 5, 2023 3:05 AM<br>To: Joseph D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>><br>Cc: 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>Subject: Re: [x3d-public] [...] HAnim2 X3D4 BoxMan update<u></u><u></u></p><p> <u></u><u></u></p><p> <u></u><u></u></p><p>> Am 05.01.2023 um 03:33 schrieb Joseph D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank"><span style="text-decoration:none;color:windowtext">joedwil@earthlink.net</span></a>>:<u></u><u></u></p><p>> <u></u><u></u></p><p>>             • Classic VRML does not allow to declare ROUTEs inside MFNode fields. Move them outside.<u></u><u></u></p><p>>  <u></u><u></u></p><p>> There may be other x3d Statements and some rules, but I don’t see any spec language for what you describe regarding ROUTE.<u></u><u></u></p><p> <u></u><u></u></p><p>The (only) relevant part of the „Classic VRML encoding“ spec is „Annex A: Grammar“:<u></u><u></u></p><p> <u></u><u></u></p><p><a href="https://www.web3d.org/documents/specifications/19776-2/V3.3/index.html" target="_blank"><span style="text-decoration:none;color:windowtext">https://www.web3d.org/documents/specifications/19776-2/V3.3/index.html</span></a><u></u><u></u></p><p> <u></u><u></u></p><p>The grammar is written in Backus-Naur form. It is the „Scheme“ of classic encoding. Have a look at the rule „mfnodeValue“. You won’t find the symbol „routeStatement“ on the right hand side of that rule.<u></u><u></u></p><p> <u></u><u></u></p><p>ROUTEs are only allowed:<u></u><u></u></p><p> <u></u><u></u></p><p>1. At the top level of the scene<u></u><u></u></p><p>2. Inside the node body (between fields)<u></u><u></u></p><p> <u></u><u></u></p><p>In my opinion it does not make much sense to forbid ROUTEs inside MFNode fields, and I am actually surprised that someone implemented it such strictly.<u></u><u></u></p><p> <u></u><u></u></p><p>Bye,<u></u><u></u></p><p> <u></u><u></u></p><p>Patrick<u></u><u></u></p><p> <u></u><u></u></p><p> <u></u><u></u></p><p>_______________________________________________<u></u><u></u></p><p>x3d-public mailing list<u></u><u></u></p><p><a href="mailto:x3d-public@web3d.org" target="_blank"><span style="text-decoration:none;color:windowtext">x3d-public@web3d.org</span></a><u></u><u></u></p><p><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank"><span style="text-decoration:none;color:windowtext">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</span></a><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></blockquote></div></div></div></div></div></blockquote></div></div>