<div dir="ltr">Adding the name ProtoInstance attribute to the joint, segment and site USE ProtoInstances would be really straightforward since it would mean just adding name="Joint" etc. This is more similar to regular nodes since for those the type of the regular node is also given (by the name of the tag):<div><br></div><div><ProtoInstance name="Joint" USE="rightElbowJoint" /></div><div><Transform USE='rightElbowTrafo" /></div><div><br></div><div>If X_ITE does not like name and USE attributes together, that is ok since the spec does not require it. I just thought the spec. should explicitly allow _omitting_ the name attribute since it otherwise but implicitly implies that the name attribute is generally required. Remember that "ProtoInstance" is not a node, it is just a statement. "<ProtoInstance name='theNode' ..>" could be considered a x3d node.</div><div><br></div><div>In the meantime I added a workaround to x3dom to digest USE ProtoInstances without name values fairly sensibly.</div><div><br></div><div>-Andreas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 22, 2020 at 8:23 PM 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">That's okay if you're generating XML from an authoring tool, but adding name to the ProtoInstances in the segment, joint and site containerField HAnim sub-objects by hand would be a pain in the neck (it's already a pain in the neck to add containerField for every node in XML). So probably, one shouldn't require a name. What I can do is look up the name in X3DJSONLD perhaps, and add the name to the right nodes? So JSON wouldn't require names, and X3DOM would be provided with names by X3DJSONLD? So that would save X3DOM the lookup? We'll either have to do the USE->DEF lookup to find names in either JSONParser.js (X3DJSONLD) or some other place in X3DOM. What's the best place? We need to do JSON schema processing in X3DJSONLD. I believe that there are a few cases where having a USE does not exclude.<div><br></div><div>On the other hand, if USE implies the code does not create a duplicate data structure, why are we worrying about putting in a name when it should be already present in the node? Does creating a single node for DEFs and USEs with the same value mean there's more than one reference to the name in X3DOM?</div><div><br></div><div>Perhaps we should write a real JSON parser for X3DOM instead of translating to XML/DOM? Something to think. about, however, perhaps VRML is higher on the stack of things to do?</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 22, 2020 at 6:46 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@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">Yes. I was saying these are the only Proto examples I came across which do have USE without a name. To me it would be clearer and more similar to regular nodes if name would be always added, perhaps even required (even though not strictly necessary).<div><br></div><div>Andreas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 22, 2020 at 6:21 PM 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:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'm not finding any name's and USE's together in ProtoInstance node in the LOA*.x3d examples from the HAnim 2 part 1 spec.<div><br></div><div>grep ProtoInstance LOA*x3d|grep USE|grep name<br><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 22, 2020 at 5:02 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@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">Looking at why the old Prototypes for HAnim did not work properly for x3dom, I found that the xml examples typically have a ProtoInstance statement with a USE attribute but without the corresponding name attribute defining the actual node type. However, x3dom expects a name attribute with every ProtoInstance statement, even USE ones, to be able to insert the appropriate node.<div><br></div><div>The xml spec at<br></div><div><br></div><div><a href="https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/concepts.html#ProtoInstanceAndFieldValueStatement" target="_blank">https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/concepts.html#ProtoInstanceAndFieldValueStatement</a></div><div><br></div><div>does not address USE of ProtoInstances but all examples always have a name attribute.</div><div><br></div><div>Also, in my quite extensive testing of Protos, I did not come across other examples of ProtoInstance elements without a name attribute.</div><div><br></div><div>To be fair, the name attribute is not strictly necessary for USE ProtoInstances since the type of the inserted node can be determined from the referenced DEF node. But having the name attribute makes ProtoInstance elements more similar to regular nodes. So I think not requiring the name attribute for USE ProtoInstances should be explicitly allowed in the xml spec., but still be encouraged.</div><div><br></div><div>I do not think the xml spec. would be otherwise affected by V.4 ?</div><div><br></div><div>Best, Andreas</div><div><br></div><div>-- <br><div dir="ltr"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div></div></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>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div>