<div dir="ltr">Here's a small python program which shows the issue. Note that required fields level=1 and conversionFactor=1.0 are not shown in XML output, but they are in the python program.<div><br></div><div>Thanks!</div><div><br></div><div>John<br><div><br></div><div># x3d.py package 4.0.64.4 loaded, have fun with X3D Graphics!<br>print("<!--")<br>from x3d import *<br>print("-->")<br>print(<br>X3D(class_="x3dModel.class", profile="Full", style_="x3dModel.style", version="4.0",<br>head=head(children=[component(name="Navigation", level=3),<br>component(name="Shaders", level=1),<br>component(name="CADGeometry", level=2),<br>unit(name="LengthUnitConversion", category="length", conversionFactor=1.0),<br>unit(name="ForceFromPoundsToNewtons", category="force", conversionFactor=4.4482),<br>]),<br>Scene=Scene())<br>.XML())<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 3, 2023 at 9:17 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">Low impact issue in x3d.py at this point:<div><br></div><div>Does one even need to list the component or unit nodes if level and conversionFactor fields are defaulted? Note: the fields are required. If a defaulted, but required field is reset in a python program, should the default be in XML output? I would like it so. See attached python program.<div><br></div><div>I'll do the tooltip thing.<br><div><br></div><div><a href="https://www.web3d.org/x3d/content/X3dTooltips.html#unit.conversionFactor" target="_blank">X3D Tooltips in English version 4.0 (web3d.org)</a> -- conversionFactor is required!<br></div><div><br></div><div><a href="https://www.web3d.org/x3d/content/X3dTooltips.html#component.level" target="_blank">X3D Tooltips in English version 4.0 (web3d.org)</a> -- level is required<br></div><div><br></div><div>X3DUOM says use="required" for both fields.</div><div><br></div><div>Should I check XML schema?</div><div><br></div><div>This is why program output needs to be validated and verified, especially if it's a program!</div><div><br></div><div>Luckily, I'm hoping this doesn't affect much, probably just x3d.py and an xslt.</div><div><br></div><div>Thanks!</div><div><br></div><div>John</div><div><div><br></div><div><component level='3' name='Navigation'/><br> <component name='Shaders'/><br> <component level='2' name='CADGeometry'/><br> <component level='2' name='DIS'/><br> <component name='H-Anim'/><br> <component name='Grouping'/><br> <component name='Layering'/><br> <unit category='angle' name='AngleUnitConversion'/><br> <unit category='length' name='LengthUnitConversion'/><br> <unit category='force' conversionFactor='4.4482' name='ForceFromPoundsToNewtons'/><br> <meta content='HelloWorldProgramOutput.x3d' name='title'/><br></div></div></div></div></div>
</blockquote></div>