<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1138768765;
mso-list-type:hybrid;
mso-list-template-ids:-554915082 2105999134 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:16;
mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoPlainText>Checking details: placement of ROUTE (and several other X3D statements) is allowed as a child of X3DGroupingNode and is permitted by XML validation.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>As noted already, we will be similarly working to make each of the file encodings and programming language bindings as symmetric as possible to maximize X3D 4.0 portability and clarity.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Of course it is a well-known error pattern to have missing or unclear ROUTE definitions. The ability to keep ROUTEs together with (i.e. promptly following) related nodes is an excellent pattern for author understanding and animation completeness. There are almost-countless instances of this pattern in the X3D Example Archives.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Finally, this was a deliberately considered topic during working group meetings and X3D 4.0 development. Note that the following example in X3D 4.0 does not state it must be at root of the scene.<o:p></o:p></p><div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.5pt;padding:0in 0in 1.0pt 0in'><p class=MsoPlainText style='border:none;padding:0in'><o:p> </o:p></p></div><p class=MsoPlainText><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoPlainText style='mso-list:l0 level1 lfo1'>X3D 4.0 Architecture, clause 4 Concepts, 4.4.2.4.1 Routes<o:p></o:p></li><li class=MsoPlainText style='mso-list:l0 level1 lfo1'>https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof/Part01/concepts.html#ModifyingObjectsRoutes<o:p></o:p></li></ul><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>EXAMPLE It is possible to create a scene with run-time behavior using only this event propagation model:</span><span style='font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>DEF TS TimeSensor {<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'> loop TRUE<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'> cycleInterval 5<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>}<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>DEF I PositionInterpolator {<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'> key [ 0 0.5 1 ]<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'> keyValue [ 0 -1 0, 0 1 0, 0 -1 0 ]<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>}<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>DEF T Transform {<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'> children [<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'> Shape {<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'> geometry Box { }<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'> }<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'> ]<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>}<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>ROUTE ts.fraction_changed TO I.set_fraction<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>ROUTE I.value_changed TO T.set_translation<o:p></o:p></span></p><div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.5pt;padding:0in 0in 1.0pt 0in'><p class=MsoPlainText style='border:none;padding:0in'><o:p> </o:p></p></div><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Also relevant:<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoPlainText style='mso-list:l0 level1 lfo1'>X3D 4.0 Architecture, clause 4 Concepts, 4.4.8.2 Routes<o:p></o:p></li><li class=MsoPlainText style='mso-list:l0 level1 lfo1'><a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof/Part01/concepts.html#Routes">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof/Part01/concepts.html#Routes</a><o:p></o:p></li><li class=MsoPlainText style='mso-list:l0 level1 lfo1'>Excerpt: “<span style='background:yellow;mso-highlight:yellow'>ROUTE statements may either appear at the top level of an X3D file or inside a node wherever fields may appear.</span> A ROUTE statement shall only appear after the definition of the source and destination nodes. Placing a ROUTE statement within a node does not associate it with that node in any way.”<o:p></o:p></li></ul><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Hope this makes sense. Thanks everyone for paying close attention… validatable correctness is essential.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Have fun with X3D! 8)<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>all the best, Don<o:p></o:p></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>-- <o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>Don Brutzman Naval Postgraduate School, Code USW/Br brutzman@nps.edu<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New"'>X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman<o:p></o:p></span></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>-----Original Message-----<br>From: x3d-public <x3d-public-bounces@web3d.org> On Behalf Of Andreas Plesch<br>Sent: Wednesday, November 1, 2023 12:36 PM<br>To: John Carlson <yottzumm@gmail.com><br>Cc: X3D Graphics public mailing list <x3d-public@web3d.org><br>Subject: Re: [x3d-public] x3d.py roundtrip for Metadata nodes in v.3.3 and v.4.0</p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I think that is because JoeKick.py puts ROUTE in the children field of a Group node which is not quite correct. ROUTEs can be children elements in the XML encoding but are not valid values for the children field. I think in the python encoding ROUTEs can probably exist only at the Scene level to avoid conflating x3d children with xml children.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>x3dcf2.py may work more robustly since the stylesheet does not really distinguish between x3d nodes and x3d statements and it did add the field parameter also to ROUTE.XML(). Perhaps give it a try.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>-Andreas<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>On Wed, Nov 1, 2023 at 1:35 PM John Carlson <<a href="mailto:yottzumm@gmail.com"><span style='color:windowtext;text-decoration:none'>yottzumm@gmail.com</span></a>> wrote:<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> First "bug" report:<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> $ py JoeKick.py<o:p></o:p></p><p class=MsoPlainText>> x3d.py package 4.0.64.4 loaded, have fun with X3D Graphics!<o:p></o:p></p><p class=MsoPlainText>> Self-test diagnostics for JoeKick.py:<o:p></o:p></p><p class=MsoPlainText>> meta information, TODO: Record information about skin coordinates <o:p></o:p></p><p class=MsoPlainText>> (found in comment at end of scene) as a structured MetadataSet containing MetadataString nodes Traceback (most recent call last):<o:p></o:p></p><p class=MsoPlainText>> File "C:\Users\john\X3DJSONLD\blend\JoeKick.py", line 715, in <module><o:p></o:p></p><p class=MsoPlainText>> newModelXML= newModel.XML() # test export method XML() for exceptions during export<o:p></o:p></p><p class=MsoPlainText>> ^^^^^^^^^^^^^^<o:p></o:p></p><p class=MsoPlainText>> File "C:\Users\john\x3d-python-mod\x3dcf.py", line 14985, in XML<o:p></o:p></p><p class=MsoPlainText>> result += str(self.Scene.XML(indentLevel=indentLevel+1, syntax=syntax))<o:p></o:p></p><p class=MsoPlainText>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<o:p></o:p></p><p class=MsoPlainText>> File "C:\Users\john\x3d-python-mod\x3dcf.py", line 14494, in XML<o:p></o:p></p><p class=MsoPlainText>> result += each.XML(indentLevel=indentLevel+1, syntax=syntax)<o:p></o:p></p><p class=MsoPlainText>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<o:p></o:p></p><p class=MsoPlainText>> File "C:\Users\john\x3d-python-mod\x3dcf.py", line 45024, in XML<o:p></o:p></p><p class=MsoPlainText>> result += each.XML(indentLevel=indentLevel+1, syntax=syntax, field="children")<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<o:p></o:p></p><p class=MsoPlainText>> TypeError: ROUTE.XML() got an unexpected keyword argument 'field'<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> I have to take a half hour off volunteering, I hope to be back soon.<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> John<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> On Wed, Nov 1, 2023 at 12:22 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com"><span style='color:windowtext;text-decoration:none'>andreasplesch@gmail.com</span></a>> wrote:<o:p></o:p></p><p class=MsoPlainText>>><o:p> </o:p></p><p class=MsoPlainText>>> Thanks for giving this a try ! Glad to hear it could be useful,<o:p></o:p></p><p class=MsoPlainText>>><o:p> </o:p></p><p class=MsoPlainText>>> Andreas<o:p></o:p></p><p class=MsoPlainText>>><o:p> </o:p></p><p class=MsoPlainText>>> > Message: 2<o:p></o:p></p><p class=MsoPlainText>>> > Date: Wed, 1 Nov 2023 11:16:24 -0400<o:p></o:p></p><p class=MsoPlainText>>> > From: Vincent Marchetti <<a href="mailto:vmarchetti@kshell.com"><span style='color:windowtext;text-decoration:none'>vmarchetti@kshell.com</span></a>><o:p></o:p></p><p class=MsoPlainText>>> > To: X3D-Public <<a href="mailto:x3d-public@web3d.org"><span style='color:windowtext;text-decoration:none'>x3d-public@web3d.org</span></a>><o:p></o:p></p><p class=MsoPlainText>>> > Subject: Re: [x3d-public] x3d.py roundtrip for Metadata nodes in v.3.3<o:p></o:p></p><p class=MsoPlainText>>> > and v.4.0<o:p></o:p></p><p class=MsoPlainText>>> > Message-ID: <<a href="mailto:38B8549E-944D-460F-B5D7-31BC73721015@kshell.com"><span style='color:windowtext;text-decoration:none'>38B8549E-944D-460F-B5D7-31BC73721015@kshell.com</span></a>><o:p></o:p></p><p class=MsoPlainText>>> > Content-Type: text/plain; charset="us-ascii"<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > Thank you Andreas, The x3dcf.py module is a useful tool for generating X3D XML encoding for those scenes which require the containerField xml attribute to unambiguously assign XML elements to the different X3D fields of the parent XML element.<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > I ran an example Python script for generating a MetadataSet node that required containerField for accurat XML encoding and the correct result is in the GeneratedCalendarMetadataWithCF.x3d file attached.<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > The pertinent accurate encoding is:<o:p></o:p></p><p class=MsoPlainText>>> > ------<o:p></o:p></p><p class=MsoPlainText>>> > <WorldInfo><o:p></o:p></p><p class=MsoPlainText>>> > <MetadataSet containerField='metadata' name='birthday' reference='https://www.archives.gov/legislative/features/washington'><o:p></o:p></p><p class=MsoPlainText>>> > <MetadataString containerField='metadata' name='calendar' value='"Julian"'/><o:p></o:p></p><p class=MsoPlainText>>> > <MetadataInteger containerField='value' name='day' value='11'/><o:p></o:p></p><p class=MsoPlainText>>> > <MetadataInteger containerField='value' name='month' value='2'/><o:p></o:p></p><p class=MsoPlainText>>> > <MetadataInteger containerField='value' name='year' value='1731'/><o:p></o:p></p><p class=MsoPlainText>>> > </MetadataSet><o:p></o:p></p><p class=MsoPlainText>>> > </WorldInfo><o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > -----<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > Vince Marchetti<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > -------------- next part -------------- A non-text attachment was <o:p></o:p></p><p class=MsoPlainText>>> > scrubbed...<o:p></o:p></p><p class=MsoPlainText>>> > Name: GenerateCalendarMetadataWithCF.py<o:p></o:p></p><p class=MsoPlainText>>> > Type: text/x-python-script<o:p></o:p></p><p class=MsoPlainText>>> > Size: 791 bytes<o:p></o:p></p><p class=MsoPlainText>>> > Desc: not available<o:p></o:p></p><p class=MsoPlainText>>> > URL: <o:p></o:p></p><p class=MsoPlainText>>> > <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/202311<o:p></o:p></p><p class=MsoPlainText>>> > 01/1383c745/attachment-0001.bin><o:p></o:p></p><p class=MsoPlainText>>> > -------------- next part -------------- A non-text attachment was <o:p></o:p></p><p class=MsoPlainText>>> > scrubbed...<o:p></o:p></p><p class=MsoPlainText>>> > Name: GeneratedCalendarMetadataWithCF.x3d<o:p></o:p></p><p class=MsoPlainText>>> > Type: model/x3d+xml<o:p></o:p></p><p class=MsoPlainText>>> > Size: 920 bytes<o:p></o:p></p><p class=MsoPlainText>>> > Desc: not available<o:p></o:p></p><p class=MsoPlainText>>> > URL: <o:p></o:p></p><p class=MsoPlainText>>> > <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/202311<o:p></o:p></p><p class=MsoPlainText>>> > 01/1383c745/attachment-0001.x3d><o:p></o:p></p><p class=MsoPlainText>>> > -------------- next part --------------<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > > On Nov 1, 2023, at 10:23 AM, Andreas Plesch <<a href="mailto:andreasplesch@gmail.com"><span style='color:windowtext;text-decoration:none'>andreasplesch@gmail.com</span></a>> wrote:<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > A quick update:<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > On Tue, Oct 31, 2023 at 3:49?PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com"><span style='color:windowtext;text-decoration:none'>andreasplesch@gmail.com</span></a>> wrote:<o:p></o:p></p><p class=MsoPlainText>>> > >><o:p></o:p></p><p class=MsoPlainText>>> > >> Notes:<o:p></o:p></p><p class=MsoPlainText>>> > >><o:p></o:p></p><p class=MsoPlainText>>> > >> x3d.py is autogenerated from X3DUOM:<o:p></o:p></p><p class=MsoPlainText>>> > >><o:p></o:p></p><p class=MsoPlainText>>> > >> <a href="https://www.web3d.org/x3d/stylesheets/python/python.html#autogen"><span style='color:windowtext;text-decoration:none'>https://www.web3d.org/x3d/stylesheets/python/python.html#autogen</span></a><o:p></o:p></p><p class=MsoPlainText>>> > >> eration<o:p></o:p></p><p class=MsoPlainText>>> > >> <a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%25"><span style='color:windowtext;text-decoration:none'>https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%</span></a><o:p></o:p></p><p class=MsoPlainText>>> > >> 2Fsourceforge.net%2Fp%2Fx3d%2Fcode%2FHEAD%2Ftree%2Fwww.web3d.org<o:p></o:p></p><p class=MsoPlainText>>> > >> %2Fx3d%2Fstylesheets%2FX3duomToX3dPythonPackage.xslt&data=05%7C0<o:p></o:p></p><p class=MsoPlainText>>> > >> 1%7Cbrutzman%40nps.edu%7Ccd2d5f56ffc7496e3e5b08dbdb11f7fb%7C6d93<o:p></o:p></p><p class=MsoPlainText>>> > >> 6231a51740ea9199f7578963378e%7C0%7C0%7C638344642474548323%7CUnkn<o:p></o:p></p><p class=MsoPlainText>>> > >> own%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik<o:p></o:p></p><p class=MsoPlainText>>> > >> 1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vUoJQilvuatDOWApbTvcw<o:p></o:p></p><p class=MsoPlainText>>> > >> vEprn8iyCs%2B%2F%2F7xTlQxpYE%3D&reserved=0<o:p></o:p></p><p class=MsoPlainText>>> > >><o:p></o:p></p><p class=MsoPlainText>>> > >> X3DUOM has all necessary containerField default value information.<o:p></o:p></p><p class=MsoPlainText>>> > >><o:p></o:p></p><p class=MsoPlainText>>> > >> But the first step may be to modify the stylesheet to generate <o:p></o:p></p><p class=MsoPlainText>>> > >> containerField attributes for all nodes, for simplicity. It <o:p></o:p></p><p class=MsoPlainText>>> > >> looks like the .XML() function would have to have an additional parameter 'field'<o:p></o:p></p><p class=MsoPlainText>>> > >> X3D(indentLevel, syntax, field) for each node.<o:p></o:p></p><p class=MsoPlainText>>> > >><o:p></o:p></p><p class=MsoPlainText>>> > >> Postprocessing the generated XML is not possible since <o:p></o:p></p><p class=MsoPlainText>>> > >> information was irretrievably lost. But postprocessing the <o:p></o:p></p><p class=MsoPlainText>>> > >> autogenerated x3d.py python code may be possible since xslt is not for everyone.<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > As a proof of concept I hacked a short awk (since I know it) <o:p></o:p></p><p class=MsoPlainText>>> > > script to process the latest x3d.py to include containerField support:<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > <a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%252"><span style='color:windowtext;text-decoration:none'>https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2</span></a><o:p></o:p></p><p class=MsoPlainText>>> > > Fgithub.com%2Fandreasplesch%2Fx3d-python-mod%2Fblob%2Fmain%2Fsrc%<o:p></o:p></p><p class=MsoPlainText>>> > > 2FcfXML.awk&data=05%7C01%7Cbrutzman%40nps.edu%7Ccd2d5f56ffc7496e3<o:p></o:p></p><p class=MsoPlainText>>> > > e5b08dbdb11f7fb%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C6383<o:p></o:p></p><p class=MsoPlainText>>> > > 44642474548323%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj<o:p></o:p></p><p class=MsoPlainText>>> > > oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6X<o:p></o:p></p><p class=MsoPlainText>>> > > xOQrg8Id5BdOwqnW52BBFwDkmMPwhgKsa2BLle6ms%3D&reserved=0<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > It looks for the Concrete Nodes section, adds a field parameter <o:p></o:p></p><p class=MsoPlainText>>> > > to the<o:p></o:p></p><p class=MsoPlainText>>> > > .XML() output function, adds the containerField attribute to the <o:p></o:p></p><p class=MsoPlainText>>> > > output, and adds the field parameter to the .XML() calls for <o:p></o:p></p><p class=MsoPlainText>>> > > metadata, SFNode and MFNode field processing.<o:p></o:p></p><p class=MsoPlainText>>> > > The awk script is very brittle since it relies on comments in <o:p></o:p></p><p class=MsoPlainText>>> > > x3d.py to find the appropriate lines to modify. The hardest part <o:p></o:p></p><p class=MsoPlainText>>> > > was to get the quoting and escaping correct.<o:p></o:p></p><p class=MsoPlainText>>> > > It generates containerField attributes for all SF/MFNode fields <o:p></o:p></p><p class=MsoPlainText>>> > > except 'children'. Of course, most are unnecessary but filtering <o:p></o:p></p><p class=MsoPlainText>>> > > systematically for defaults would probably require involving <o:p></o:p></p><p class=MsoPlainText>>> > > X3DUOM and the generation stylesheet, similar to other XML related 'fields'<o:p></o:p></p><p class=MsoPlainText>>> > > such as style or class.<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > The result is <o:p></o:p></p><p class=MsoPlainText>>> > > <a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%252"><span style='color:windowtext;text-decoration:none'>https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2</span></a><o:p></o:p></p><p class=MsoPlainText>>> > > Fraw.githubusercontent.com%2Fandreasplesch%2Fx3d-python-mod%2Fmai<o:p></o:p></p><p class=MsoPlainText>>> > > n%2Fx3dcf.py&data=05%7C01%7Cbrutzman%40nps.edu%7Ccd2d5f56ffc7496e<o:p></o:p></p><p class=MsoPlainText>>> > > 3e5b08dbdb11f7fb%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638<o:p></o:p></p><p class=MsoPlainText>>> > > 344642474548323%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQI<o:p></o:p></p><p class=MsoPlainText>>> > > joiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=p<o:p></o:p></p><p class=MsoPlainText>>> > > Lm5kiuYmgbb5jcjp09KTCrIzUt2p%2BkdYlrjyYpkhac%3D&reserved=0<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > The modified python script appears to work as expected by adding <o:p></o:p></p><p class=MsoPlainText>>> > > the appropriate containerField attributes in XML output for all <o:p></o:p></p><p class=MsoPlainText>>> > > the examples I tried.<o:p></o:p></p><p class=MsoPlainText>>> > > Realistically, this is as far as I can go with this but I think <o:p></o:p></p><p class=MsoPlainText>>> > > it may show how containerField support in XML output could be <o:p></o:p></p><p class=MsoPlainText>>> > > provided with x3d.py.<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > -Andreas<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > _______________________________________________<o:p></o:p></p><p class=MsoPlainText>>> > > x3d-public mailing list<o:p></o:p></p><p class=MsoPlainText>>> > > <a href="mailto:x3d-public@web3d.org"><span style='color:windowtext;text-decoration:none'>x3d-public@web3d.org</span></a><o:p></o:p></p><p class=MsoPlainText>>> > > <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org"><span style='color:windowtext;text-decoration:none'>http://web3d.org/mailman/listinfo/x3d-public_web3d.org</span></a><o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > ------------------------------<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > Message: 3<o:p></o:p></p><p class=MsoPlainText>>> > Date: Wed, 1 Nov 2023 11:05:29 -0500<o:p></o:p></p><p class=MsoPlainText>>> > From: John Carlson <<a href="mailto:yottzumm@gmail.com"><span style='color:windowtext;text-decoration:none'>yottzumm@gmail.com</span></a>><o:p></o:p></p><p class=MsoPlainText>>> > To: Andreas Plesch <<a href="mailto:andreasplesch@gmail.com"><span style='color:windowtext;text-decoration:none'>andreasplesch@gmail.com</span></a>><o:p></o:p></p><p class=MsoPlainText>>> > Cc: X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org"><span style='color:windowtext;text-decoration:none'>x3d-public@web3d.org</span></a>><o:p></o:p></p><p class=MsoPlainText>>> > Subject: Re: [x3d-public] x3d.py roundtrip for Metadata nodes in v.3.3<o:p></o:p></p><p class=MsoPlainText>>> > and v.4.0<o:p></o:p></p><p class=MsoPlainText>>> > Message-ID:<o:p></o:p></p><p class=MsoPlainText>>> > <o:p></o:p></p><p class=MsoPlainText>>> > <CAGC3UEkYxP0tk5rQ23VVhsd0gXW7W+AH5QaS=AWxkv0f8kgo1Q@mail.gmail.com<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > Content-Type: text/plain; charset="utf-8"<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > You are awesome, Andreas! Awk would not have been my choice, but <o:p></o:p></p><p class=MsoPlainText>>> > apparently, you made it work! Perhaps I will make a Perl script based on<o:p></o:p></p><p class=MsoPlainText>>> > your awk. A python script could be written to process X3DUOM and probably<o:p></o:p></p><p class=MsoPlainText>>> > do the matching as well.<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > Dang cool!<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > On Wed, Nov 1, 2023 at 9:24 AM Andreas Plesch <o:p></o:p></p><p class=MsoPlainText>>> > <<a href="mailto:andreasplesch@gmail.com"><span style='color:windowtext;text-decoration:none'>andreasplesch@gmail.com</span></a>><o:p></o:p></p><p class=MsoPlainText>>> > wrote:<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > > A quick update:<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > On Tue, Oct 31, 2023 at 3:49?PM Andreas Plesch <o:p></o:p></p><p class=MsoPlainText>>> > > <<a href="mailto:andreasplesch@gmail.com"><span style='color:windowtext;text-decoration:none'>andreasplesch@gmail.com</span></a>><o:p></o:p></p><p class=MsoPlainText>>> > > wrote:<o:p></o:p></p><p class=MsoPlainText>>> > > ><o:p></o:p></p><p class=MsoPlainText>>> > > > Notes:<o:p></o:p></p><p class=MsoPlainText>>> > > ><o:p></o:p></p><p class=MsoPlainText>>> > > > x3d.py is autogenerated from X3DUOM:<o:p></o:p></p><p class=MsoPlainText>>> > > ><o:p></o:p></p><p class=MsoPlainText>>> > > > <a href="https://www.web3d.org/x3d/stylesheets/python/python.html#autoge"><span style='color:windowtext;text-decoration:none'>https://www.web3d.org/x3d/stylesheets/python/python.html#autoge</span></a><o:p></o:p></p><p class=MsoPlainText>>> > > > neration<o:p></o:p></p><p class=MsoPlainText>>> > > ><o:p></o:p></p><p class=MsoPlainText>>> > > <a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%252"><span style='color:windowtext;text-decoration:none'>https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2</span></a><o:p></o:p></p><p class=MsoPlainText>>> > > Fsourceforge.net%2Fp%2Fx3d%2Fcode%2FHEAD%2Ftree%2Fwww.web3d.org%2<o:p></o:p></p><p class=MsoPlainText>>> > > Fx3d%2Fstylesheets%2FX3duomToX3dPythonPackage.xslt&data=05%7C01%7<o:p></o:p></p><p class=MsoPlainText>>> > > Cbrutzman%40nps.edu%7Ccd2d5f56ffc7496e3e5b08dbdb11f7fb%7C6d936231<o:p></o:p></p><p class=MsoPlainText>>> > > a51740ea9199f7578963378e%7C0%7C0%7C638344642474548323%7CUnknown%7<o:p></o:p></p><p class=MsoPlainText>>> > > CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwi<o:p></o:p></p><p class=MsoPlainText>>> > > LCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vUoJQilvuatDOWApbTvcwvEprn8i<o:p></o:p></p><p class=MsoPlainText>>> > > yCs%2B%2F%2F7xTlQxpYE%3D&reserved=0<o:p></o:p></p><p class=MsoPlainText>>> > > ><o:p></o:p></p><p class=MsoPlainText>>> > > > X3DUOM has all necessary containerField default value information.<o:p></o:p></p><p class=MsoPlainText>>> > > ><o:p></o:p></p><p class=MsoPlainText>>> > > > But the first step may be to modify the stylesheet to generate <o:p></o:p></p><p class=MsoPlainText>>> > > > containerField attributes for all nodes, for simplicity. It <o:p></o:p></p><p class=MsoPlainText>>> > > > looks like the .XML() function would have to have an additional parameter 'field'<o:p></o:p></p><p class=MsoPlainText>>> > > > X3D(indentLevel, syntax, field) for each node.<o:p></o:p></p><p class=MsoPlainText>>> > > ><o:p></o:p></p><p class=MsoPlainText>>> > > > Postprocessing the generated XML is not possible since <o:p></o:p></p><p class=MsoPlainText>>> > > > information was irretrievably lost. But postprocessing the <o:p></o:p></p><p class=MsoPlainText>>> > > > autogenerated x3d.py python code may be possible since xslt is not for everyone.<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > As a proof of concept I hacked a short awk (since I know it) <o:p></o:p></p><p class=MsoPlainText>>> > > script to process the latest x3d.py to include containerField support:<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > <a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%252"><span style='color:windowtext;text-decoration:none'>https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2</span></a><o:p></o:p></p><p class=MsoPlainText>>> > > Fgithub.com%2Fandreasplesch%2Fx3d-python-mod%2Fblob%2Fmain%2Fsrc%<o:p></o:p></p><p class=MsoPlainText>>> > > 2FcfXML.awk&data=05%7C01%7Cbrutzman%40nps.edu%7Ccd2d5f56ffc7496e3<o:p></o:p></p><p class=MsoPlainText>>> > > e5b08dbdb11f7fb%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C6383<o:p></o:p></p><p class=MsoPlainText>>> > > 44642474548323%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj<o:p></o:p></p><p class=MsoPlainText>>> > > oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6X<o:p></o:p></p><p class=MsoPlainText>>> > > xOQrg8Id5BdOwqnW52BBFwDkmMPwhgKsa2BLle6ms%3D&reserved=0<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > It looks for the Concrete Nodes section, adds a field parameter <o:p></o:p></p><p class=MsoPlainText>>> > > to the<o:p></o:p></p><p class=MsoPlainText>>> > > .XML() output function, adds the containerField attribute to the <o:p></o:p></p><p class=MsoPlainText>>> > > output, and adds the field parameter to the .XML() calls for <o:p></o:p></p><p class=MsoPlainText>>> > > metadata, SFNode and MFNode field processing.<o:p></o:p></p><p class=MsoPlainText>>> > > The awk script is very brittle since it relies on comments in <o:p></o:p></p><p class=MsoPlainText>>> > > x3d.py to find the appropriate lines to modify. The hardest part <o:p></o:p></p><p class=MsoPlainText>>> > > was to get the quoting and escaping correct.<o:p></o:p></p><p class=MsoPlainText>>> > > It generates containerField attributes for all SF/MFNode fields <o:p></o:p></p><p class=MsoPlainText>>> > > except 'children'. Of course, most are unnecessary but filtering <o:p></o:p></p><p class=MsoPlainText>>> > > systematically for defaults would probably require involving <o:p></o:p></p><p class=MsoPlainText>>> > > X3DUOM and the generation stylesheet, similar to other XML related 'fields'<o:p></o:p></p><p class=MsoPlainText>>> > > such as style or class.<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > The result is<o:p></o:p></p><p class=MsoPlainText>>> > > <a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%252"><span style='color:windowtext;text-decoration:none'>https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2</span></a><o:p></o:p></p><p class=MsoPlainText>>> > > Fraw.githubusercontent.com%2Fandreasplesch%2Fx3d-python-mod%2Fmai<o:p></o:p></p><p class=MsoPlainText>>> > > n%2Fx3dcf.py&data=05%7C01%7Cbrutzman%40nps.edu%7Ccd2d5f56ffc7496e<o:p></o:p></p><p class=MsoPlainText>>> > > 3e5b08dbdb11f7fb%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638<o:p></o:p></p><p class=MsoPlainText>>> > > 344642474704621%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQI<o:p></o:p></p><p class=MsoPlainText>>> > > joiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7<o:p></o:p></p><p class=MsoPlainText>>> > > 4nwRmIni6cSY%2FMdNtOH5VNh9l6%2FScsR4te6XOlwKug%3D&reserved=0<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > The modified python script appears to work as expected by adding <o:p></o:p></p><p class=MsoPlainText>>> > > the appropriate containerField attributes in XML output for all <o:p></o:p></p><p class=MsoPlainText>>> > > the examples I tried.<o:p></o:p></p><p class=MsoPlainText>>> > > Realistically, this is as far as I can go with this but I think <o:p></o:p></p><p class=MsoPlainText>>> > > it may show how containerField support in XML output could be <o:p></o:p></p><p class=MsoPlainText>>> > > provided with x3d.py.<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > > -Andreas<o:p></o:p></p><p class=MsoPlainText>>> > ><o:p></o:p></p><p class=MsoPlainText>>> > -------------- next part -------------- An HTML attachment was <o:p></o:p></p><p class=MsoPlainText>>> > scrubbed...<o:p></o:p></p><p class=MsoPlainText>>> > URL: <o:p></o:p></p><p class=MsoPlainText>>> > <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/202311<o:p></o:p></p><p class=MsoPlainText>>> > 01/59b1f34d/attachment.html><o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > ------------------------------<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > Subject: Digest Footer<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > _______________________________________________<o:p></o:p></p><p class=MsoPlainText>>> > x3d-public mailing list<o:p></o:p></p><p class=MsoPlainText>>> > <a href="mailto:x3d-public@web3d.org"><span style='color:windowtext;text-decoration:none'>x3d-public@web3d.org</span></a><o:p></o:p></p><p class=MsoPlainText>>> > <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org"><span style='color:windowtext;text-decoration:none'>http://web3d.org/mailman/listinfo/x3d-public_web3d.org</span></a><o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > ------------------------------<o:p></o:p></p><p class=MsoPlainText>>> ><o:p></o:p></p><p class=MsoPlainText>>> > End of x3d-public Digest, Vol 176, Issue 4<o:p></o:p></p><p class=MsoPlainText>>> > ******************************************<o:p></o:p></p><p class=MsoPlainText>>><o:p> </o:p></p><p class=MsoPlainText>>><o:p> </o:p></p><p class=MsoPlainText>>><o:p> </o:p></p><p class=MsoPlainText>>> --<o:p></o:p></p><p class=MsoPlainText>>> Andreas Plesch<o:p></o:p></p><p class=MsoPlainText>>> Waltham, MA 02453<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>--<o:p></o:p></p><p class=MsoPlainText>Andreas Plesch<o:p></o:p></p><p class=MsoPlainText>Waltham, MA 02453<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>_______________________________________________<o:p></o:p></p><p class=MsoPlainText>x3d-public mailing list<o:p></o:p></p><p class=MsoPlainText><a href="mailto:x3d-public@web3d.org"><span style='color:windowtext;text-decoration:none'>x3d-public@web3d.org</span></a><o:p></o:p></p><p class=MsoPlainText><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org"><span style='color:windowtext;text-decoration:none'>http://web3d.org/mailman/listinfo/x3d-public_web3d.org</span></a><o:p></o:p></p></div></body></html>