<div dir="ltr"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">Alternatively, do the right thing when there's no containerField (default) specified in MetadataXxx statements in all X3dTo*.xslt. Particularly X3dToJson.xslt, as I use it quite a lot.</p><p style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">See below.</p><p style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">Thanks!</p><p style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">John</p><p style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><b><br></b></p><p style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><b>Table 15.2. containerField Considerations for Metadata Nodes</b></p><table summary="Field definitions for X3DMetadataObject" border="1" style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><colgroup><col><col><col></colgroup><thead><tr><th>Case</th><th>containerField</th><th>Parent node</th></tr></thead><tbody><tr><td>Provide metadata values for parent node</td><td>containerField="metadata" (default)</td><td>Any node except MetadataSet</td></tr><tr><td>Provide metadata value nodes in a set</td><td>containerField="value"</td><td>MetadataSet</td></tr><tr><td>Provide metadata information about parent</td><td>containerField="metadata" (default)</td><td>MetadataSet<br><br></td></tr></tbody></table></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 1, 2023 at 1:35 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</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 dir="ltr"><div dir="ltr">This appears to be relevant:<div><br></div><div><a href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter15-Metadata/Chapter15-MetadataInformation.html#:~:text=Usually%20Metadata%20nodes%20are%20blank,node%20is%20used%20by%20itself" target="_blank">https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter15-Metadata/Chapter15-MetadataInformation.html#:~:text=Usually%20Metadata%20nodes%20are%20blank,node%20is%20used%20by%20itself</a>.<br></div><div><br></div><div>Please emit containerField="metadata" in top level MetadataXzz statements.</div><div><br></div><div>Thanks!</div><div><br></div><div>John</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 1, 2023 at 12:28 AM 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">Hi John. All of the JSON that you find is produced by our X3dToJson.xslt stylesheet, which hopefully meets all patterns we derived and documented at<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"><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">Well-formed JSON can be checked. All of our online examples have a link to check via JSONLint, though tonight it is saying “unable to connect” (while providing plenty of advertising).<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 Example Archives: X3D4WA, X3D for Web Authors, Chapter 01 Technical Overview, Hello World<u></u><u></u></li><li style="margin-left:0in"><a href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorldIndex.html" target="_blank">https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorldIndex.html</a><u></u><u></u></li><li style="margin-left:0in">upper-right inset box of links: <a href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.json" title="JavaScript Object Notation (JSON) encoding of X3D model" target="_blank"><span style="font-size:13.5pt;font-family:"Times New Roman",serif">.json</span></a><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black"> (</span><a href="https://jsonlint.com/?json=https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.json" title="jsonlint validation" target="_blank"><span style="font-size:13.5pt;font-family:"Times New Roman",serif">check</span></a><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black">)</span><u></u><u></u></li><li style="margin-left:0in"><a href="https://jsonlint.com/?json=https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.json" target="_blank">https://jsonlint.com/?json=https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.json</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">If there are mistakes in our X3D .xml -> .json pattern or the conversion stylesheet, they can be fixed.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Strict JSON validation isn’t possible until a JSON Schema is approved. If you think that there is a Java-based implementation of the draft JSON Schema that is mature and stable enough to deserve our time, we can try adding that to our various build tools for X3D Example Archives and X3DJSAIL.<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="http://json-schema.org" target="_blank">http://json-schema.org</a><u></u><u></u></li></ul><div><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></div><p class="MsoNormal"><u></u> <u></u></p><div><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> John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> <br><b>Sent:</b> Friday, June 30, 2023 8:24 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> X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br><b>Subject:</b> Is <a href="https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.json" target="_blank">https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.json</a> valid?<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><div><div><div><div><div><div><p class="MsoNormal">Don, if<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><a href="https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.json" target="_blank">https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.json</a><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">is supposed to be valid X3D JSON, please inform me. Thanks! <u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">To ensure that -value is not a field of Shape in JSON, I have added the following exception in x3djsonld.py.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><div><p class="MsoNormal"> <span style="color:lime"> if parent in ("Text", "Shape") and key in ("value"): # don't have value yet, sorry</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="color:lime"> # do value later</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="color:lime"> raise "-value not a supported field of Text or Shape, try -metadata?"</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="color:lime"> continue</span><u></u><u></u></p></div></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="color:black">I can revert the code if necessary. I'm trying to follow the standard as I see it.</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="color:black">If -value under Shape is correct, then X3DJSAIL needs to support addValue (as I have it in Java) or setValue. That's my opinion.</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="color:black">John</span><u></u><u></u></p></div></div></div></div></div></div></div></div></div></div></div></div></blockquote></div>
</blockquote></div>