<div dir="ltr">in freewrl, DEF strings aren't stored in the node, they are added to a lookup table (DEF,node) (string, binaryNode) during parsing.<div>When the parser hits an xml node definition, if there's a USE, it goes through the lookup table to see if there's a node already defined, and if so it plops a binary reference to that node into the scenegraph and ignores the rest of the xml USE declaration.</div><div>If it gets another DEF with the same name while parsing, it </div><div>a) replaces 

the previous (name,node) tuple OR</div><div>b) adds to end of list a new (DEF,node) tuple</div><div>(I don't remember which)</div><div>So next USE it looks up the name in the table.</div><div>- I think different browsers iterate over the list / do the lookup different ways, </div><div>- IIRC flux will stick with the first (DEF,node)</div><div>- and freewrl will stick with the last (DEF,node)</div><div>-Doug</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 19, 2020 at 11:10 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="auto">Here’s my understanding of DEFed nodes.   DEF creates one more parent node similar to USE, but another DEF with same value allows update or addition of fields of the multiply mentioned node, where USE does not.</div><div dir="auto"><br></div><div dir="auto">DEF nodes with the same DEF value may appear more than once in XML.</div><div dir="auto"><br></div><div dir="auto">Okay?</div>
_______________________________________________<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>