<div dir="ltr">Now I understand why I got all the blank stares when I suggested using a symbol table for DEFs. To me, a DEF is like a var in ECMAScript. I guess DEF is more like id attribute in HTML5: double references are "allowed", for some reason.<div><br></div><div>Very confusing for someone coming from a standard programming language like Java.</div><div><div><br></div><div>Now i understand what you guys mean when you say ID/IDREF (at least the first half).</div><div><br></div><div>John</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 26, 2020 at 10:21 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">Gotcha. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 26, 2020 at 9:50 AM Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@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">There isn't a "name" field general for all nodes. Some specific nodes<br>
have "name" field, but it's specific to these nodes and their needs<br>
(MetadataXxx, CADPart, CADLayer, HAnimHumanoid, HAnimJoint,<br>
X3DVertexAttributeNode etc.). And it has special interpretation (e.g.<br>
for X3DVertexAttributeNode this "name" is a shader per-vertex<br>
attribute name).<br>
<br>
So when X3D specification (link you posted,<br>
<a href="https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#DEFL_USESemantics" rel="noreferrer" target="_blank">https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#DEFL_USESemantics</a><br>
) talks about """Node names""" -> it means that names assigned using<br>
DEF. Not names assigned using name="xxx"...<br>
<br>
Confusing, I know.<br>
<br>
It's an unfortunate collision of terms, the "name of X3D node" can<br>
indeed be interpreted in various ways, depending on context. When<br>
someone talks of a general X3D node, then they surely mean "name<br>
assigned using DEF".<br>
<br>
Regards,<br>
Michalis<br>
<br>
czw., 26 mar 2020 o 15:25 John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> napisał(a):<br>
><br>
> Maybe I'm confused. Are node names<br>
><br>
> name="node name"<br>
><br>
> or<br>
><br>
> DEF="node name"<br>
><br>
> I've been using "DEF value" for "DEF keyword" I think.<br>
><br>
> I think if the DEF keyword is not unique with in a scope, my ProtoExpander will blow big chunks, but I'll have to check.<br>
><br>
> There were many discussions on the mailing list about this, and maybe I didn't understand because I wasn't phrasing the question properly.<br>
><br>
> In some cases in the wrl previously reported, the DEF keyword is not unique in the source file, but I didn't check for the source (that is, I didn't inspect the source file very much), there could be additional scope stuff like a PROTO.<br>
><br>
> John<br>
><br>
> On Thu, Mar 26, 2020 at 7:25 AM Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>> wrote:<br>
>><br>
>> I have to correct myself -- I see x3d 3.3 specification says """Node names shall be unique in the context within which the associated DEF keyword occurs."""<br>
>><br>
>> All right, that's good. Looks like this rule was improved at some x3d version. That's good, it is a better idea to have all names unique (e.g. for easy EXPORT).<br>
>><br>
>> It still remains a question why did my converter generate repeated DEF. It should not, if source VRML didn't repeat them. I'll look into it -- please send input to reproduce it:)<br>
>><br>
>> Regards,<br>
>> Michalis<br>
>><br>
>> W dniu czw., 26.03.2020 o 12:09 Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>> napisał(a):<br>
>>><br>
>>> As I mentioned in the other thread, multiple DEF with the same name<br>
>>> are just allowed by the X3D specification. Last one "wins" (obscuring<br>
>>> the others with the same name). Maybe they should be disallowed or<br>
>>> discouraged, it's another discussion. But right now they are allowed<br>
>>> and proper VRML / X3D reader should understand them.<br>
>>><br>
>>> As to why my exporter created them -- I need to see the relevant input<br>
>>> file to answer it. There should be a good reason for it :)<br>
>>><br>
>>> Regards,<br>
>>> Michalis<br>
>>><br>
>>> czw., 26 mar 2020 o 06:30 John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> napisał(a):<br>
>>> ><br>
>>> > DEF/USE is how multiparent nodes are achieved, but all DEF and USE with the same value are the same node, except for a few special cases.<br>
>>> ><br>
>>> > This is what one reason why HTML DOM is a poor choice...the nodes have only one parent.<br>
>>> ><br>
>>> > Or I’m still battling windmills?<br>
>>> ><br>
>>> > John<br>
>>> ><br>
>>> > On Wed, Mar 25, 2020 at 10:16 PM GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>> wrote:<br>
>>> >><br>
>>> >> double defining:<br>
>>> >> - this stymied me too, until I realized the DEF/USE are just for the parser, and its the sequence that counts although different for different browsers.<br>
>>> >> - if you redef 3 times, then USE, what will you get?<br>
>>> >> - that depends on the web3d browser, with some sticking to the first DEF, some the last DEF.<br>
>>> >><br>
>>> >> On Wed, Mar 25, 2020 at 9:01 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
>>> >>><br>
>>> >>> If one DEF specified a shape and another DEF with the same value with a different shape, wouldn't the 2 browsers show different shapes if they picked different DEFs?<br>
>>> >>><br>
>>> >>> I don't think double DEFs should be allowed within the same namespace.<br>
>>> >>><br>
>>> >>> John<br>
>>> >>><br>
>>> >>> On Wed, Mar 25, 2020 at 9:12 PM GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>> wrote:<br>
>>> >>>><br>
>>> >>>> Chisel? "it was simply put in the public domain by Trapezium when they folded many years ago. They didn¹t specify any license" - Louka<br>
>>> >>>> <a href="http://dug9.users.sourceforge.net/web3d/temp/chisel-src.zip" rel="noreferrer" target="_blank">http://dug9.users.sourceforge.net/web3d/temp/chisel-src.zip</a><br>
>>> >>>> But I suspect double-deffing isn't illegal. I think I've been through it, and different browsers honored the first or last definition.<br>
>>> >>>> -Doug<br>
>>> >>>><br>
>>> >>>> On Wed, Mar 25, 2020 at 7:43 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
>>> >>>>><br>
>>> >>>>> That is, more than one DEF with the same value.<br>
>>> >>>>><br>
>>> >>>>> I realize that separate PROTOs may have the same DEF due to namespaces. Unfortunately writing a Unix script to find this takes massive brain power.<br>
>>> >>>>><br>
>>> >>>>> John<br>
>>> >>>>><br>
>>> >>>>> On Wed, Mar 25, 2020 at 8:37 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
>>> >>>>>><br>
>>> >>>>>> I’m not particular looking for a vrml parser unless it catches double use of a DEF.<br>
>>> >>>>>><br>
>>> >>>>>> Thanks,<br>
>>> >>>>>><br>
>>> >>>>>> John<br>
>>> >>>>>><br>
>>> >>>>>> I’m thinking my next project might be a VRML validator if there isn’t one handy? Anyone?<br>
>>> >>>>>><br>
>>> >>>>>> I know I can translate VRML to XML.<br>
>>> >>>>>><br>
>>> >>>>>> John<br>
>>> >>>>>><br>
>>> >>>>>> On Wed, Mar 25, 2020 at 3:38 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
>>> >>>>>>><br>
>>> >>>>>>> Say, where is a VRML Validator? !!!!<br>
>>> >>>>>>><br>
>>> >>>>>>> On Wed, Mar 25, 2020 at 3:33 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
>>> >>>>>>>><br>
>>> >>>>>>>> I will download X3D-Edit and do some validation on the files, or go to the validation site @ savage<br>
>>> >>>>><br>
>>> >>>>> _______________________________________________<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>
>>> >>>><br>
>>> >>>> _______________________________________________<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>
>>> ><br>
>>> > _______________________________________________<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>