I do not have an example of a X3D python program which generates an invalid XML encoded file. The XML encoding generated using the x3d package as deployed from this SourceForge project does pass the validation tests in X3D-Edit. The x3d package as extended in the vincentmarchetti/x3dpy_containerfield github repo also generates valid XML encoded files; and in some cases such as the HAnim models, better rendering in our X3D browsers.
I do not have an example of a X3D python program which, generates an invalid XML encoding file. The XML encoding generated using the x3d package as deployed from this SourceForge project does pass the validation tests in X3D-Edit. The x3d package as extended in the vincentmarchetti/x3dpy_containerfield github repo also generates valid XML encoded files; and in some cases such as the HAnim models, better rendering in our X3D browsers.
There is a release at https://github.com/vincentmarchetti/x3dpy_containerfield/releases/tag/rel-1-0-0 of an extension of the x3d package which, following A Plesch's suggestion above, adds a containerField XML attribute in the XML encoding of a node, in those cases where the SFNode/MFNode property that the emitted node is "in", does not match the default containerField as reported by the CONTAINERFIELD_DEFAULT value. The github project https://github.com/vincentmarchetti/x3dpy_containerfield has the...
level field of component statement not emitted in XML output
level property of component statement not emitted in XML output
Attached is the invalid Python code generated by the X3dToPython.xslt stylesheet at rev 38138, using the simplified_anim.x3d file, wth XML comments, as input. The error report from Python is: (cadmium): python -m simplified_hanim.py Traceback (most recent call last): File "<frozen runpy>", line 189, in _run_module_as_main File "<frozen runpy>", line 112, in _get_module_details File "/Users...on/simplified_hanim.py", line 109 ), ^ SyntaxError: closing parenthesis ')' does not match opening parenthesis...
Attached is the invalid Python code generated by the X3dToPython.xslt stylesheet at rev 38138, using the simplified_anim.x3d file, wth XML comments, as input. The error report from Python is: (cadmium): python -m simplified_hanim.py Traceback (most recent call last): File "<frozen runpy>", line 189, in _run_module_as_main File "<frozen runpy>", line 112, in _get_module_details File "/Users/vmarchetti/Library/CloudStorage/OneDrive-Personal/Documents/SPRI/SPRI 2026/SPRI 2026-01/hanim_simplification/simplified_hanim.py",...
Additonal diagnostic information: When the XML comments are removed from the simplified_hanim.x3d file, then valid Python code is generated both at the 38138 revision and the most recent 38453 revision