<div dir="auto">Here’s how I currently handle multiline comments in python:</div><div dir="auto"><br></div><div dir="auto"><div style="font-size:inherit">"""<OrientationInterpolator DEF='Stop_l_midtarsal_RotationInterpolator' key='0 0.5 1' keyValue='0 0 1 0 0 0 1 0 0 0 1 0'/>"""<br style="font-size:inherit">OrientationInterpolator1792 = x3d.OrientationInterpolator()<br style="font-size:inherit">OrientationInterpolator1792.DEF = "Stop_l_metatarsal_RotationInterpolator"<br style="font-size:inherit">OrientationInterpolator1792.key = [0,0.5,1]<br style="font-size:inherit"><br style="font-size:inherit">Group1783.children.append(OrientationInterpolator1792)<br style="font-size:inherit"></div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">(I realize keyValue is missing, my bad)</div><br></div><div dir="auto"><br></div><div dir="auto">Here’s how I envision the comment:</div><div dir="auto"><br></div><div dir="auto"><div dir="auto" style="font-size:inherit"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important">Comment1791 = x3d.Comment("""<OrientationInterpolator DEF='Stop_l_midtarsal_RotationInterpolator' key='0 0.5 1' keyValue='0 0 1 0 0 0 1 0 0 0 1 0'/>""")</span></div><div dir="auto" style="font-size:inherit"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important"><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important">Group1783.children.append(Comment1791)</span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important"><br></span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important"><br></span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important">Easy, I hope?</span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important"><br></span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important">I’m going to pursue this in my PythonSerializer!</span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important"><br></span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important">Next, GraalPy.</span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important"><br></span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important">John</span></div><br></span></div><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Dec 29, 2025 at 5:40 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Well, there already is an X3DStatement called Comment in X3DPSAIL.</div><div dir="auto"><br></div><div dir="auto">Can X3dToPython.xslt use it?</div><div dir="auto"><br></div><div dir="auto">John </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 29, 2025 at 5:25 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Including Loren.  Loren, Don and I have been discussing how to handle converting multi-line XML comments to Python in XSLT for X3DPSAIL programs.   Particularly using X3dToPython.xslt. I am not an expert at XSLT, and don’t have appropriate tools, so I’ve been leaning on Don unduly.</div><div dir="auto"><br></div><div dir="auto">Note that I do like:</div><div dir="auto"><br></div><div dir="auto">“””</div><div dir="auto">comment here</div><div dir="auto">“””</div><div dir="auto"><br></div><div dir="auto">Python comments, but I don’t know if we can put them directly in the scenegraph.  Just putting one “#” for a multi-line XML comment when translating to Python isn’t going to work.  Maybe removing line endings would work.   Also a “#” per comment line may also work.</div><div dir="auto"><br></div><div dir="auto">I think the combination of a “””…””” multi-line comment <span style="font-family:-apple-system,sans-serif">and a CommentsBlock class instance constructor wrapper around the comment may do the trick, and also fits in the scene graph for round-tripping.   This has worked in X3DJSAIL, AFAIK.  I don’t know about output from X3DPSAIL yet.  I believe that X3DJSAIL also offers .addComments() methods to add CommentsBlock instances to the scenegraph, in many classes.  I would primarily like this feature in order to do round-trip testing back to XML.  Obviously there’s a whole discussion whether we should be converting XML to Java and Python.  That’s how I create Java and Python test cases.  Don prefers hand-coding tests, I think, and probably feels he is serving the programming community.  I feel we have 4000+ XML examples that serve an excellent proving ground.   Plus, I also have my own tests for my JSON loader I create from XML.</span></div><div dir="auto"><span style="font-family:-apple-system,sans-serif"><br></span></div><div dir="auto"><span style="font-family:-apple-system,sans-serif"><div style="font-size:inherit"><div dir="auto" style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">Ultimately the above will be critical if we wish to output comments using the XML(), VRML() and JSON(), etc. methods in X3DPSAIL to produce documentation inside the scenegraph output.   This will be useful for documenting X3D encoded files output from Maya, Blender, etc.</div></div></span></div><div dir="auto"><br></div><div dir="auto">Don hasn’t weighed in on this except to state he needs simple examples, or examples in the archive that he controls.  Previous bug reports have been marked ‘won’t fix.’  <div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important"><br></span></div><div style="font-size:inherit" dir="auto"><span style="color:rgb(0,0,0);font-family:-apple-system,sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important">Joe and I created an .x3d file with multi-line comments that broke the Python generated by X3dToPython.xslt.</span></div></div><div dir="auto"><br></div><div dir="auto">I can find a multi-line comments in the XML in the X3D archive, if there are any there, the POSIX shell command is relatively simple.   If you need help identifying multi-line comments to reduce to single-line comments, that should be a cinch!   I can probably produce a list of files.</div><div dir="auto"><br></div><div dir="auto">Ultimately, the solution may just be to use single-line comments, but that doesn’t allow round-tripping.</div><div dir="auto"><br></div><div dir="auto"><span style="font-family:-apple-system,sans-serif">John</span><br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p></p></div>    <div>
    <div>
      
      
    </div>
    
    </div></blockquote></div></div>
</blockquote></div></div>
</div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div></div>