<div dir="ltr">Note:  JSONParser.js does not contain a validator, so we fall back to any validation is done on DOM/XML.<div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 28, 2020 at 2:47 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">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="auto">Thanks, I will take a look.<br><br><div>---on the phone---</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 28, 2020, 9:17 AM Christoph Valentin <<a href="mailto:christoph.valentin@gmx.at" target="_blank">christoph.valentin@gmx.at</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><div style="font-family:Verdana;font-size:12px"><div>Hi Andreas,</div>

<div> </div>

<div>I felt free to provide an example scene in three flavors.</div>

<div> </div>

<div>The prototype renders a little pig that says "Eatme!", when you touch it (in remembrance of Douglas Adams)</div>

<div> </div>

<div>Version A: <ProtoInstance USE="xxx" name="yyy"/>    WITH name attribute - standards compliant</div>

<div>Version B: <ProtoInstance USE="xxx"/>  WITHOUT name attribute</div>

<div>Version C: <Script USE="xxx"/>  WORKAROUND - works for all browsers</div>

<div> </div>

<div>I tested with BS Contact --- he can cope with all three versions.</div>

<div> </div>

<div>Download the .zip file at <a href="https://lc-soc-lc.at/experimental/ProtoInstanceWithUSE/" rel="noreferrer" target="_blank">https://lc-soc-lc.at/experimental/ProtoInstanceWithUSE/</a>     I provide it by a GPLv3.</div>

<div> </div>

<div>Feed Back welcome. You may take it and give it to your benchmark tests, if you like.</div>

<div> </div>

<div>Kind regards,</div>

<div>Christoph</div>

<div> 
<div> 
<div name="quote" style="margin:10px 5px 5px 10px;padding:10px 0px 10px 10px;border-left:2px solid rgb(195,217,229)">
<div style="margin:0px 0px 10px"><b>Gesendet:</b> Dienstag, 24. November 2020 um 00:30 Uhr<br>
<b>Von:</b> "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com" rel="noreferrer" target="_blank">andreasplesch@gmail.com</a>><br>
<b>An:</b> "Christoph Valentin" <<a href="mailto:christoph.valentin@gmx.at" rel="noreferrer" target="_blank">christoph.valentin@gmx.at</a>><br>
<b>Cc:</b> "X3D Graphics public mailing list" <<a href="mailto:x3d-public@web3d.org" rel="noreferrer" target="_blank">x3d-public@web3d.org</a>><br>
<b>Betreff:</b> Re: [x3d-public] ProtoInstance USE without name</div>

<div name="quoted-content">
<div>Hi Christoph,
<div> </div>

<div>thanks, interesting. Perhaps it will be useful to try a USE ProtoInstance in a very simple scene, in multiple browsers.</div>

<div> </div>

<div>-Andreas</div>
</div>
 

<div class="gmail_quote">
<div class="gmail_attr">On Mon, Nov 23, 2020 at 1:01 PM Christoph Valentin <<a href="mailto:christoph.valentin@gmx.at" rel="noreferrer" target="_blank">christoph.valentin@gmx.at</a>> wrote:</div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div style="font-family:Verdana;font-size:12px">
<div> </div>

<div>
<div>Hi</div>

<div> </div>

<div>This bug is common to many X3D players (even classical non-WebGL X3D players).</div>

<div> </div>

<div>I was used to use following workaround, which worked for all relevant players:</div>

<div> </div>

<div>If I want to USE a DEFd ProtoInstance, I will actually instantiate a <Script> node with USE.</div>

<div> </div>

<div>KR,</div>

<div>Christoph</div>

<div> 
<div style="margin:10px 5px 5px 10px;padding:10px 0px 10px 10px;border-left:2px solid rgb(195,217,229)">
<div style="margin:0px 0px 10px"><b>Gesendet:</b> Montag, 23. November 2020 um 00:00 Uhr<br>
<b>Von:</b> "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com" rel="noreferrer" target="_blank">andreasplesch@gmail.com</a>><br>
<b>An:</b> "X3D Graphics public mailing list" <<a href="mailto:x3d-public@web3d.org" rel="noreferrer" target="_blank">x3d-public@web3d.org</a>><br>
<b>Betreff:</b> [x3d-public] ProtoInstance USE without name</div>

<div>
<div>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> </div>

<div>The xml spec  at</div>

<div> </div>

<div><a href="https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/concepts.html#ProtoInstanceAndFieldValueStatement" rel="noreferrer" target="_blank">https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/concepts.html#ProtoInstanceAndFieldValueStatement</a></div>

<div> </div>

<div>does not address USE of ProtoInstances but all examples always have a name attribute.</div>

<div> </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> </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> </div>

<div>I do not think the xml spec. would be otherwise affected by V.4 ?</div>

<div> </div>

<div>Best, Andreas</div>

<div> </div>

<div>--
<div>
<div>
<div>Andreas Plesch<br>
Waltham, MA 02453</div>
</div>
</div>
</div>
</div>
_______________________________________________ x3d-public mailing list <a href="mailto:x3d-public@web3d.org" rel="noreferrer" target="_blank">x3d-public@web3d.org</a> <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></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
 

<div> </div>
--

<div>
<div>
<div>Andreas Plesch<br>
Waltham, MA 02453</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</blockquote></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>