[x3d-public] Fwd: ProtoInstance USE without name

John Carlson yottzumm at gmail.com
Sat Nov 28 11:33:36 PST 2020


Yes, everything needs to be tested.   My recent test cases apply to HAnim.
  I encourage people as we produce HAnim LOA4 examples to test them.   We
should get back to that next week, I hope.

John
On Sat, Nov 28, 2020 at 1:04 PM Christoph Valentin <
christoph.valentin at gmx.at> wrote:

> That's great.
>
> And I felt free to provide three .x3d files in order to test the
> translators as well as classical X3D players, as Andreas asked me.
>
> --
> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail
> gesendet.
> Am 28.11.20, 19:48 schrieb John Carlson <yottzumm at gmail.com>:
>
>> Christopher, I have no real control over XML to JSON, even though I have
>> a little used tool which does it.
>>
>> My primary goal is rendering JSON as other “encodings.”
>>
>> So if something doesn’t match my schema, it gets flagged.   If we allow
>> name along with USE, that means I have to put special-case code in my
>> schema generating tool.  My goal is to stop bad JSON at its source, namely
>> X3dToJson.xslt.
>>
>> In other words, I don’t want to write schema that won’t appear in the
>> standard (TBD).
>>
>> It is much easier for humans to understand consistent rules, and not a
>> bunch of if statements testing for whether I’m dealing with a ProtoInstance
>> and therefore I need to do something different.
>>
>> Let’s make one rule and apply it to all instances of name and USE in a
>> node.
>>
>> 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/43299170/attachment-0001.html>


More information about the x3d-public mailing list