<div style="font-size:inherit" dir="auto">Summary: to employ multiple DEFs with same value, employ a table per name scope of DEF information in per Java thread java.lang.ThreadLocal memory for encoded output with one DEF per DEF/USE value.  See bolded table description below.</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">Feel free to forward.</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">Is many DEFs with same value for<span style="font-size:inherit"> a scenegraph node being considered in discussions?  Say I want to addChild() the same Shape node several times to different Transforms</span><span style="font-size:inherit">, and the Shape node or descendants have DEFs in them.  In X3DJ</span><span style="font-size:inherit">SAIL, of course.   </span><span style="font-size:inherit">This is easily done in an SAI binding like X3DJSAIL, just use the same variable passed to several addChild() methods.</span></div><div style="font-size:inherit" dir="auto"><span style="font-size:inherit"></span></div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">If it is allowed, what comes out in XML?  I am hoping one leading DEF and several USEs for backwards compatibility.  I think Castle has shown that this is doable.</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">I am not saying VRML, XML, DOM, or HTML should have multiple parents of a child node. If a browser wants to implement a proxy when a DEF/USE appears more than once, they should be free to do that.  (Hint: JavaScript’s Proxy class.) Maybe each mention of a DEF value (second or following) or USE value (any natural number of them) should create a Proxy on setting or adding?</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">I do think the encodings are doing the right thing, no changes there.  How can we achieve that output and support multiple parents (references or proxies to children) in X3DJSAIL with one DEF node per DEF value <span style="font-size:inherit">output?</span></div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">I’m particularly wondering for X3DJSAIL.</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">Do we need proxies, or will table(s) also solve the issue of multiple DEFs, and replace all but the first with USE on output<span style="font-size:inherit">?  Also perhaps assuming there’s a DEF table per name scope.  How does X3DJSAIL support name scopes? (I’m clueless, currently).  <b>I’m imagining a table with DEF_value, DEF_found, reference_count, DEF_nodes and USE_nodes columns.  Maybe a name_scope and node_type_name as well.</b>  These table(s) would be initialized when output begins potentially when a name scope is entered, and filled out as the XML is created.   Multiple threads?  The table can be stored in ThreadLocal memory.  Bingo, if it’s still a thing.</span></div><div style="font-size:inherit" dir="auto"><span style="font-size:inherit"><br></span></div><div style="font-size:inherit" dir="auto"><span style="font-size:inherit">Please let me know if such a thing is already available.</span></div><div style="font-size:inherit" dir="auto"><span style="font-size:inherit"><br></span></div><div style="font-size:inherit" dir="auto"><span style="font-size:inherit">Someone else can solve for X3DPSAIL?</span></div><div style="font-size:inherit" dir="auto"><span style="font-size:inherit"><br></span></div><div style="font-size:inherit" dir="auto">Will this also handle USE before DEF?</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">John</div>