<div><div dir="auto"><div><div style="font-size:inherit" dir="auto">I am attaching a Java example. Python and is an hour away by car. I have XML here, I’ll try to create a zip. Sorting of HAnim fields between Java and Python may be different.</div></div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">Again, the problem only shows up when HAnimHumanoid skinCoord/skin and HAnimSegment children/coord is involved.</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto"><br></div><div><br><div class="gmail_quote"></div></div></div><div dir="auto"><div dir="ltr" class="gmail_attr">On Sat, May 2, 2026 at 12:48 PM GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr">Q1. what are the formal names for <div>a) an element tree where no element can be duplicated -- each DEF and USE is a separate element</div></div></blockquote><div dir="auto"><br></div></div></div><div><div><div><div dir="auto">DOM Document? Elements are Nodes in DOM. There are other node types.</div></div></div></div><div><div><div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr"><div dir="auto"></div><div>b) a node tree where the same node can appear multiple times</div></div></blockquote><div dir="auto"><br></div></div></div></div><div><div><div><div dir="auto">Scene graph?</div></div></div></div><div><div><div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr"><div dir="auto"></div><div>Q2. do X3DJSAIL and x3d.py have the same issue - they are exporting from an element tree?</div></div></blockquote></div></div></div><div><div><div><div dir="auto"><br>X3d.py thinks it’s an element tree, as of 4.0.64.4. X3DJSAIL can’t replace a USE with a DEF if the DEF is disconnected, so I would say there’s a problem.</div></div></div></div><div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr"><div dir="auto"></div><div>Q3. would a solution for x3d.py work with X3DJSAIL?</div></div></blockquote><div dir="auto"><br></div></div></div></div><div><div><div><div dir="auto">Good question. I’ve tried developing a solution for x3d.py. I’m more confident with Java. Support for multi-threading in Python? ???? Java should have a ThreadLocal solution.</div></div><div><div><div class="gmail_quote"></div></div></div></div></div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr"><div dir="auto"></div><div>Q4. are there links to the code generators for each (may send links privately if vulnerable to hackers)</div></div></blockquote><div dir="auto"><br></div></div></div><div><div><div dir="auto"><div style="font-size:inherit"><a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/CreateX3dSceneAccessInterfaceJava.xslt" style="font-size:inherit" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/CreateX3dSceneAccessInterfaceJava.xslt</a></div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto"><div style="font-size:inherit"><a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3duomToX3dPythonPackage.xslt" style="font-size:inherit" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3duomToX3dPythonPackage.xslt</a></div><br></div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">Commands to build in that folder:</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">$ ant create.X3DJSAIL</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">code appears in:</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">java/src/org</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">compiled byte code in</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">java/jars</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">$ ant create.X3DPSAIL</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">code appears in python/x3d.py</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">X3D-Edit can provide a complete environment.</div><br></div></div></div><div><div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr"><div dir="auto"></div><div dir="auto">Q5. who has write permission on the code generators?</div></div></blockquote><div dir="auto"><br></div></div></div><div><div><div dir="auto">I believe Don gives privileges out. He has told me to provide examples, and he will do the coding. I have never changed either stylesheet directly, preferring to work in my own environment. Vince is also working with x3d.py. He recently tried an LLM DEF/USE patch.</div></div></div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr"><div dir="auto"></div><div>Q6. do stakeholders --including those who see no problem-- agree to allow those who see a problem to fix the problem they see?</div></div></blockquote><div dir="auto"><br></div></div></div><div><div><div dir="auto">AFAIK, only HAnim is directly affected by problems I am seeing. That’s probably why no one else is seeing the problem.</div></div></div><div><div><div><div><div class="gmail_quote"><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr"><div dir="auto"></div><div>-Doug</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 2, 2026 at 11:40 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto">Note that Saxon does not support dynamic maps, so I suggest that e.g.: ‘’’new Group().setUSE(“DEF_value”)’’’ continue to be used for USE nodes Saxon-generated Java code.</div><div dir="auto"><br></div><div dir="auto">Does any see an issue with what Doug proposed supporting this requirement?</div><div dir="auto"><br></div><div dir="auto">The USE x3dnode will be converted into a x3dnode reference, and some x3dnodes will have multiple references pointing at them, per specification. Also, programmers can reuse DEF/USE x3dnodes in the scenegraph. I don’t know if non-DEF/USE x3dnodes can be reused. That seems like an error. Comments?</div><div dir="auto"><br></div><div dir="auto">On XML output from Java, the USE elements will be restored.</div><div dir="auto"><br></div><div dir="auto">Can anyone analyze Comment instances and containerFields for USE nodes? This might be a reason to stay with a strict tree, and try for author intent or field order canonicalization. Or alternatively, as Don is pursuing, optional USE before DEF everywhere. I am not opposed to that, it just means updating Blender import, I believe.</div><div dir="auto"><br></div><div dir="auto">Probably some examples would be great.</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 2, 2026 at 10:38 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto">Doug,</div><div dir="auto"><br></div><div dir="auto">I think it would work, yes. The problem is getting the code into the X3DJSAIL stylesheet and getting a clean room solution, since I’ve been polluted by LLM code examples.</div><div dir="auto"><br></div><div dir="auto">I’m hoping Don or someone will step up to work on this. Gotta turn the ship somehow.</div><div dir="auto"><br></div><div dir="auto">I can provide Java test cases. I’ve already provided one that orphans a DEF node. This seems like the next logical step. I’ve also provided JinOne that at one time, listed USE before DEF.</div><div dir="auto"><br></div><div dir="auto">The orphaned DEF node leads towards a solution, which means we will need the following:</div><div dir="auto"><br></div><div dir="auto">One follow-on test case will include a Java DAG. There’s already an API for this using setUSE(node), but handling double+ add* and set* calls for same MFNode and SFNode parameters would be helpful, and there are tons of these. These test cases were brought up a long time ago, in x3d.py work. Primarily, the focus will be outputting USE nodes to de-DAGify to XML.</div><div dir="auto"><br></div><div dir="auto">Then a double DEF. This can throw an error, of course, or merely warn and replace one with USE.</div><div dir="auto"><br></div><div dir="auto">Are the requirements adequate? Are people prepared to address these?</div><div dir="auto"><br></div><div dir="auto">The primary goal is to have a valid XML output from X3DJSAIL that will work with older technology. Even help the Java programmer out a bit. Not all Java code is generated by programs! ;) If the goal is to output invalid XML, you’re on your own!</div><div dir="auto"><br></div><div dir="auto">John</div><div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sat, May 2, 2026 at 7:40 AM GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr"><div>Exporting</div><div>a) binary scene graph:</div>Lets say you start with a scene graph like a browser or editing tool would have internally, and the same node appears lets say twice in the scenegraph, and there's a name scope lookup table that holds (node address, string DEF name). And lets say you want to export, and your export function works in a single pass, in a serial branching manner, starting from the root node.<div>You could have a function writeNode(node) and a lookup table written (node address). The first time the node is encountered, writeNode() checks the written table, and if the node isn't listed, it adds it, and writes a full DEF. The second time the node is encountered, writeNode() finds it in the written list, and writes a USE.</div><div>b) weird graph with separate DEF and USE elements:</div><div>Now lets say you don't have a scene graph with binary nodes. Instead you have DEF and USE 'elements' / weird things --like x3d.py has. Then what you suggest - an extra pass before exporting, to somehow consolidate the DEF and USE so they refer to a single thing, would help. On the pre-pass, starting with a blank lookup table per nane scope written( DEF name, node), writeNode() could add (DEF name, DEF element address, bool written = false) when it finds a full DEF, but not write anything out. Then on the second pass, when it hits a USE or DEF, it checks the written table with the DEF/USE name to get the full DEF element. If it hasn't been written yet (written flag false), writeNode() writes the element as a full DEF element, sets the written flag to true. If it has been written --written flag true-- it writes a USE element.</div><div>Would that work for X3DJSAIL?</div><div>-Doug</div></div><br><div class="gmail_quote"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 1, 2026 at 11:03 PM John Carlson via x3d-public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">There are 2 distinct problems: the Java input problem (mine) and the XML input problem (Don). Solving the XML input problem doesn’t solve the Java input problem.<div dir="auto"><br></div><div dir="auto">My requirements:<div dir="auto"><br></div><div dir="auto">For XML output from X3DJSAIL, handle multiple paths to a DEF x3dnode in a directed acyclic graph.</div><div dir="auto"><br></div><div dir="auto">For XML output from X3DJSAIL, handle multiple DEF x3dnodes with same value and combine attributes, and replace second or further DEF x3dnodes with a USE xmlnode on output.</div><div dir="auto"><br></div><div dir="auto">For XML output from X3DJSAIL, only have an DEF attribute value for the first of xmlnodes with same DEF/USE value. The remaining x3dnodes with the same DEF/USE will have a USE value, and potentially a containerField value different from DEF and USE x3dnodes with the same DEF/USE value. THE USE nodes will have a name attribute value where required.</div><div dir="auto"><br></div><div dir="auto">It appears that to meet these requirements a second pass on output will be required. I believe the only way to avoid this is to only have one x3dnode for each DEF/USE value. We could make that a requirement of X3DJSAIL users, but I haven’t seen any traction on that.</div><div dir="auto"><br></div><div dir="auto">It might be required that a second pass on input if USE is before DEF, especially if USE is before DEF. We can’t avoid USE before DEF on output without a second pass. Field order canonicalization and author intent are non-starters.</div><div dir="auto"><br></div><div dir="auto">So it appears like we need 3 passes, an input pass, a common DEF/USE x3dnode discovery pass, and an output pass. I would prefer to put the discovery pass after the scene is built, because who knows what a Java developer is going to put together.</div><div dir="auto"><span><br></span></div><div dir="auto"><span>Thanks for reading,</span><br></div><div dir="auto"><span><br></span></div><div dir="auto"><span>John </span></div></div></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div></div>
</div>
</div>
</div>