[x3d-public] Fwd: ProtoInstance USE without name

John Carlson yottzumm at gmail.com
Sat Nov 28 11:19:56 PST 2020


As an example of where I had to generate something to put in the DOM
document which was derivable from JSON, I refer to containerFields which
appear in XML .  I specifically added tests in X3DJSONLD.js and
JSONParser.js to add the containerField to the produced  DOM document.

Otherwise, HAnim wouldn’t work.  So there’s a decision between adding to
X3DJSONLD and X3DOM proper.  In the USE/name case, this applied to both
JSON and XML, so we added it to X3DOM.

On Sat, Nov 28, 2020 at 12:57 PM John Carlson <yottzumm at gmail.com> wrote:

> We’re defining the JSON, not the tool, IMHO.
>
> John
>
> On Sat, Nov 28, 2020 at 12:31 PM Christoph Valentin <
> christoph.valentin at gmx.at> wrote:
>
>> hi John.
>>
>> Understand.
>>
>> All I can remember, when I did my trials with x3d, then some players
>> insisted on the "name" attribute, others considered it an error, at least a
>> warning.
>>
>> Using <Script> was a compromise that just worked.
>>
>> So lets wait the test results, before defining the behavior of relay
>> software between XML and JSON (which should be applicable to ALL browsers
>> and users).
>>
>> I do not know if I'm the only one who used the <Script>- Woraround.
>>
>> kr
>>
>> --
>> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail
>> gesendet.
>> Am 28.11.20, 19:09 schrieb John Carlson <yottzumm at gmail.com>:
>>
>>> I don’t see JSON schema moving through IETF quickly, and last I heard,
>>> they were going to standardize 4 different drafts of JSON schema.   They
>>> are even seeking assistance when taking the draft to IETF.  Volunteers?
>>>
>>> X3D does not have a standardized JSON schema.   The best we have for USE
>>> might work across all versions of X3D.   I do not know the history of USE.
>>>
>>> It is my intention to maintain a JSON schema for each X3DUOM versions.
>>>
>>> I don’t think we’re putting validation in the standard, that’s up to the
>>> vendors.
>>>
>>> I don’t ever recall seeing X3D XML schema in a standard?
>>>
>>> John
>>>
>>> On Sat, Nov 28, 2020 at 11:52 AM Christoph Valentin <
>>> christoph.valentin at gmx.at> wrote:
>>>
>>>> Hi John,
>>>>
>>>> as far as I think to understand the IETF community, the robustness
>>>> principle is meant to be applied for cases, when the standard is fuzzy.
>>>>
>>>> So it applies to our case here.
>>>>
>>>> You can do a very strict validation, if a standard
>>>>
>>>>    - is well-defined, well-accepted, well-deployed and precise
>>>>    - is not subject to future changes nor has got a past
>>>>
>>>> Otherwise every validation must accept compromises
>>>>
>>>> Agree?
>>>>
>>>> KR
>>>> Christoph
>>>>
>>>>
>>>> *Gesendet:* Samstag, 28. November 2020 um 18:36 Uhr
>>>> *Von:* "John Carlson" <yottzumm 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] Fwd: ProtoInstance USE without name
>>>> Should one accept SQL injection?   No!
>>>>
>>>> Note:  I have not added any validation to X3DOM or X_ITE, and do not
>>>> expect to.
>>>>
>>>> I do not expect to strip out validation from X3DJSONLD anytime soon.
>>>>
>>>> John
>>>>
>>>> On Sat, Nov 28, 2020 at 11:26 AM John Carlson <yottzumm at gmail.com>
>>>> wrote:
>>>>
>>>>> 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
>>>>>>
>>>>>> _______________________________________________
>>>>> 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/813214d1/attachment-0001.html>


More information about the x3d-public mailing list