[x3d-public] Fwd: ProtoInstance USE without name
John Carlson
yottzumm at gmail.com
Sat Nov 28 09:25:56 PST 2020
If I accept everything, validation is useless. That’s why I provide a way
for the user to override :).
On Sat, Nov 28, 2020 at 11:22 AM Christoph Valentin <
christoph.valentin at gmx.at> wrote:
> hi all
>
> Do you know Jon Postel's robustness principle?
>
> Be liberal in what you accept and conservative in what you send out.
>
> means: add the name attribute when sending
> keep the name attribute when forwarding/proxying
> ignore the name attribute when receiving.
> kr
>
> --
> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail
> gesendet.
> Am 28.11.20, 17:58 schrieb John Carlson <yottzumm at gmail.com>:
>
>> Again, if USE is specified in a proto instance in X3D JSON, then
>> X3DJSONLD and related tools will not validate a name property in the node.
>> I suggest X3dToJson.xslt reject the spurious name when generating JSON.
>>
>> John
>>
>> ---------- Forwarded message ---------
>> From: Christoph Valentin <christoph.valentin at gmx.at>
>> Date: Sat, Nov 28, 2020 at 8:18 AM
>> Subject: Re: [x3d-public] ProtoInstance USE without name
>> To: Andreas Plesch <andreasplesch at gmail.com>
>> CC: X3D Graphics public mailing list <x3d-public at web3d.org>
>>
>>
>> Hi Andreas,
>>
>> I felt free to provide an example scene in three flavors.
>>
>> The prototype renders a little pig that says "Eatme!", when you touch it
>> (in remembrance of Douglas Adams)
>>
>> Version A: <ProtoInstance USE="xxx" name="yyy"/> WITH name attribute -
>> standards compliant
>> Version B: <ProtoInstance USE="xxx"/> WITHOUT name attribute
>> Version C: <Script USE="xxx"/> WORKAROUND - works for all browsers
>>
>> I tested with BS Contact --- he can cope with all three versions.
>>
>> Download the .zip file at
>> https://lc-soc-lc.at/experimental/ProtoInstanceWithUSE/ I provide it
>> by a GPLv3.
>>
>> Feed Back welcome. You may take it and give it to your benchmark tests,
>> if you like.
>>
>> Kind regards,
>> Christoph
>>
>>
>> *Gesendet:* Dienstag, 24. November 2020 um 00:30 Uhr
>> *Von:* "Andreas Plesch" <andreasplesch at gmail.com>
>> *An:* "Christoph Valentin" <christoph.valentin at gmx.at>
>> *Cc:* "X3D Graphics public mailing list" <x3d-public at web3d.org>
>> *Betreff:* Re: [x3d-public] ProtoInstance USE without name
>> Hi Christoph,
>>
>> thanks, interesting. Perhaps it will be useful to try a USE ProtoInstance
>> in a very simple scene, in multiple browsers.
>>
>> -Andreas
>>
>> On Mon, Nov 23, 2020 at 1:01 PM Christoph Valentin <
>> christoph.valentin at gmx.at> wrote:
>>
>>>
>>> Hi
>>>
>>> This bug is common to many X3D players (even classical non-WebGL X3D
>>> players).
>>>
>>> I was used to use following workaround, which worked for all relevant
>>> players:
>>>
>>> If I want to USE a DEFd ProtoInstance, I will actually instantiate a
>>> <Script> node with USE.
>>>
>>> KR,
>>> Christoph
>>>
>>> *Gesendet:* Montag, 23. November 2020 um 00:00 Uhr
>>> *Von:* "Andreas Plesch" <andreasplesch at gmail.com>
>>> *An:* "X3D Graphics public mailing list" <x3d-public at web3d.org>
>>> *Betreff:* [x3d-public] ProtoInstance USE without name
>>> 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.
>>>
>>> The xml spec at
>>>
>>>
>>> https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/concepts.html#ProtoInstanceAndFieldValueStatement
>>>
>>> does not address USE of ProtoInstances but all examples always have a
>>> name attribute.
>>>
>>> Also, in my quite extensive testing of Protos, I did not come across
>>> other examples of ProtoInstance elements without a name attribute.
>>>
>>> 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.
>>>
>>> I do not think the xml spec. would be otherwise affected by V.4 ?
>>>
>>> Best, Andreas
>>>
>>>
>> --
>>> Andreas Plesch
>>> Waltham, MA 02453
>>> _______________________________________________ x3d-public mailing list
>>> x3d-public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>
>>
>>
>> --
>> Andreas Plesch
>> Waltham, MA 02453
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>> _______________________________________________ x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20201128/4202819f/attachment-0001.html>
More information about the x3d-public
mailing list