<div dir="ltr">Again, the main reason for restricting to only USE in the JSON Schema is to reduce the number of subschemas...only USE, name and possibly DEF, USE and name (and class)--not handled. You might argue that 3 is not that much bigger than 2, the current number of subschemas. If one can argue all the possible cases without blowing your mind, I will work towards a set of rules that can be added to the JSON schema generator. I'm looking for simplicity in error statements so that user can understand how to fix the JSON document. I hired Alex to write a simplifier, but we went with ajv-i18n instead. This was before we added the USE-only subschema. I believe that the hand generator only has 1 or 2 cases with USE-only.<div><br></div><div>Since I don't render, I don't need to create multiparents yet. Validating multiparents would be a trick, it seems.<br><div><div><br></div><div>John</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 29, 2020 at 9:21 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">X3DJSONLD validator: <a href="https://coderextreme.net/X3DJSONLD/src/main/html/validator.html" target="_blank">https://coderextreme.net/X3DJSONLD/src/main/html/validator.html</a><div><br></div><div>Requires JSON input to validate. Copy/Paste.</div><div><br></div><div>You may edit between validator calls (press link to validate).</div><div><br></div><div>One may also switch to partial Deutsch. Requests for other languages welcome, as long as they are supported by Ajv (ajv-i18n).</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 29, 2020 at 2:54 PM Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</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">On 11/29/2020 10:51 AM, John Carlson wrote:<br>
> <br>
> This seems to be a pointer to part of the thread:<br>
> <br>
> <a href="http://web3d.org/pipermail/x3d-public_web3d.org/2017-September/007480.html" rel="noreferrer" target="_blank">http://web3d.org/pipermail/x3d-public_web3d.org/2017-September/007480.html</a> <<a href="http://web3d.org/pipermail/x3d-public_web3d.org/2017-September/007480.html" rel="noreferrer" target="_blank">http://web3d.org/pipermail/x3d-public_web3d.org/2017-September/007480.html</a>><br>
<br>
yup.<br>
<br>
Nice to test implementations, checking out the playing field. Meanwhile specification remains paramount and validation tools implement those rules. This is definitely an "edge case" since strict validation is challenging, but (mercifully) strict correctness is possible.<br>
<br>
Wondering, did you test your examples A B and C in X3D Validator? Hard to be confident they are correct otherwise. Confounding unrelated problems can confuse, GIGO... further if you find a curious or badly responding case, then that will help us improve diagnostics even further.<br>
<br>
* X3D Validator is a Web application that comprehensively checks X3D scene validity<br>
<a href="https://savage.nps.edu/X3dValidator" rel="noreferrer" target="_blank">https://savage.nps.edu/X3dValidator</a><br>
<br>
> On Sun, Nov 29, 2020 at 12:46 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>> wrote:<br>
> <br>
> Everyone please remember this conversation. Or perhaps put a link to this thread on a website which discusses USE and name tradeoffs for nodes.<br>
<br>
put prior summary reported to Christophe into tooltips for ProtoInstance name and USE.<br>
<br>
* X3D Scene Authoring Hints: Inline Scenes and Prototype Templates<br>
<a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Inlines" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Inlines</a><br>
<br>
* X3D Scene Authoring Hints: 🔖 Prototype Instances<br>
<a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#ProtoInstance" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#ProtoInstance</a><br>
<br>
* X3D4 Tooltips.html ProtoInstance has links to schema, dtd, mail list search, mantis issues, schema doctype SAI etc.<br>
<a href="https://www.web3d.org/x3d/tooltips/X3dTooltips.html#ProtoInstance" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/tooltips/X3dTooltips.html#ProtoInstance</a><br>
<br>
* <a href="https://www.web3d.org/x3d/tooltips/X3dTooltips.html#ProtoInstance.name" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/tooltips/X3dTooltips.html#ProtoInstance.name</a><br>
<br>
"Warning: name must be specified unless this ProtoInstance is a USE node. Do not include name with ProtoInstance USE since it is duplicative (i.e. name is already defined in the DEF instance) and this approach avoids potential name mismatches."<br>
<br>
* <a href="https://www.web3d.org/x3d/tooltips/X3dTooltips.html#ProtoInstance.USE" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/tooltips/X3dTooltips.html#ProtoInstance.USE</a><br>
<br>
"Warning: do not define a name field in a USE node, the correct name can already be found in the original ProtoInstance DEF node."<br>
<br>
... and these tooltip improvements ripple helpfully into documentation embedded during next build/deploy of X3DUOM, X3DJSAIL Java, X3DPSAIL x3d.py Python package, and X3D Ontology turtle comments/labels. So continued scrutiny and improvements remains welcome.<br>
<br>
p.s. InstantReality is truly great but it also has a handful of bugs/quirks that haven't been touched for years. Am having trouble installing it on an alternate machine because it seems to be demanding obsolete Microsoft VisualStudio dll installations... Wondering if anyone is home there??<br>
<br>
have fun with X3D! 8)<br>
<br>
<br>
> There's another thread somewhere on the same ProtoInstance topic, if anyone cares to look.<br>
> <br>
> No changes to JSON Schema that I know of required!<br>
> <br>
> I believe there are still some statements which may have both USE and name. Those are OK, and noted.<br>
> <br>
> Thanks, guys!<br>
> <br>
> John<br>
> <br>
> On Sun, Nov 29, 2020 at 12:24 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a> <mailto:<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>>> wrote:<br>
> <br>
> Some results of testing browsers:<br>
> <br>
> freeWrl: A and B works, C does not<br>
> InstantPlayer: A and C renders, B does not, warning: "obligatory name is missing"; no sound in any on my system<br>
> view3dscene: A, B and C work, no warnings in any.<br>
> Octaga: A,B and C work, no warnings in any.<br>
> <br>
> In addition, I replaced "Script" with "Group" in C, with the same results in all browsers. This indicates that some browsers essentially ignore the Node type in a xml encoded USE node, following the VRML style of USE.<br>
> <br>
> [ So, in the XML encoding, we could have had a <USE name="DEFname" /> construct which may have been discussed but was decided against, perhaps for reasons of validation. ]<br>
> <br>
> Only InstantPlayer requires the name attribute in a USE ProtoInstance, indicating a gap in the xml specification. While requiring the name attribute would be cleaner, in my view, it would break backward compatibility. Therefore explicitly USE without name for ProtoInstances makes the most sense to me. This would make InstantPlayer a little non-compliant.<br>
> <br>
> Cheers, -Andreas<br>
> <br>
> <br>
> <br>
> On Sun, Nov 29, 2020 at 10:00 AM Christoph Valentin <<a href="mailto:christoph.valentin@gmx.at" target="_blank">christoph.valentin@gmx.at</a> <mailto:<a href="mailto:christoph.valentin@gmx.at" target="_blank">christoph.valentin@gmx.at</a>>> wrote:<br>
> <br>
> The archive has been updated.<br>
> . Removed the unused prototype<br>
> two additional editorial corrections<br>
> to be crystal clear: the optimum would be to have a clear X3D standard and to remove the workaround forever.<br>
> @all: do other users have similar experiences with ProtoInstances, DEF and USE? I am not the only user of X3D, am I?<br>
> kr<br>
> *Gesendet:* Sonntag, 29. November 2020 um 15:39 Uhr<br>
> *Von:* "Christoph Valentin" <<a href="mailto:christoph.valentin@gmx.at" target="_blank">christoph.valentin@gmx.at</a> <mailto:<a href="mailto:christoph.valentin@gmx.at" target="_blank">christoph.valentin@gmx.at</a>>><br>
> *An:* "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a> <mailto:<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>>><br>
> *Cc:* "X3D Graphics public mailing list" <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a> <mailto:<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>>><br>
> *Betreff:* Re: [x3d-public] ProtoInstance USE without name<br>
> Hi Andreas,<br>
> <br>
> The MoosTrigger can be deleted. I forgot it there, sorry (it would be used for MU capability). I will correct asap.<br>
> <br>
> The only theory I have is that the external behaviour of scripts and protos regarding the event cascade is very similar. Both have fields that can be arbitrarily defined. So a reference to a script can hold a reference to a ProtoInstance.<br>
> <br>
> Sorry I am not a Browser developer, but I am a (potential) user of X3D, dont know so much about X3D internals. It could even be an intention of the standard.<br>
> <br>
> kr<br>
> <br>
> --<br>
> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.<br>
> Am 29.11.20, 15:24 schrieb Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a> <mailto:<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>>>:<br>
> <br>
> Hi Christoph,<br>
> The Pig proto is using a "Moostrigger" proto. Should the Mosstrigger proto be included in the archive, or can it be ignored, eg. commented out ?<br>
> I am struggling to understand how Version C, the Script workaround, could work:<br>
> <!-- the second pig , version C - ProtoInstance WITHOUT name --><br>
> <Transform translation='3 0 0' rotation='0 1 0 -1.57'><br>
> <Script USE="ThePig"/><br>
> </Transform><br>
> and the ThePig DEF is:<br>
> <ProtoInstance DEF="ThePig" name='Pig'/><br>
> So the ThePig DEF is not a Script node. ( And the Pig proto is of Group type. ). It seems like it is just a coincidence that it works with BSContact. Perhaps BSContact somehow treats all ProtoInstances as Scripts ?<br>
> Do you have a theory why the workaround actually works with some browsers ?<br>
> Thanks, Andreas<br>
> On Sat, Nov 28, 2020 at 3:46 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a> <mailto:<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>>> wrote:<br>
> <br>
> Thanks, I will take a look.<br>
> ---on the phone---<br>
> On Sat, Nov 28, 2020, 9:17 AM Christoph Valentin <<a href="mailto:christoph.valentin@gmx.at" target="_blank">christoph.valentin@gmx.at</a> <mailto:<a href="mailto:christoph.valentin@gmx.at" target="_blank">christoph.valentin@gmx.at</a>>> wrote:<br>
> <br>
> Hi Andreas,<br>
> I felt free to provide an example scene in three flavors.<br>
> The prototype renders a little pig that says "Eatme!", when you touch it (in remembrance of Douglas Adams)<br>
> Version A: <ProtoInstance USE="xxx" name="yyy"/> WITH name attribute - standards compliant<br>
> Version B: <ProtoInstance USE="xxx"/> WITHOUT name attribute<br>
> Version C: <Script USE="xxx"/> WORKAROUND - works for all browsers<br>
> I tested with BS Contact --- he can cope with all three versions.<br>
> 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> <<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.<br>
> Feed Back welcome. You may take it and give it to your benchmark tests, if you like.<br>
> Kind regards,<br>
> Christoph<br>
> *Gesendet:* Dienstag, 24. November 2020 um 00:30 Uhr<br>
> *Von:* "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a> <mailto:<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>>><br>
> *An:* "Christoph Valentin" <<a href="mailto:christoph.valentin@gmx.at" target="_blank">christoph.valentin@gmx.at</a> <mailto:<a href="mailto:christoph.valentin@gmx.at" target="_blank">christoph.valentin@gmx.at</a>>><br>
> *Cc:* "X3D Graphics public mailing list" <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a> <mailto:<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>>><br>
> *Betreff:* Re: [x3d-public] ProtoInstance USE without name<br>
> Hi Christoph,<br>
> thanks, interesting. Perhaps it will be useful to try a USE ProtoInstance in a very simple scene, in multiple browsers.<br>
> -Andreas<br>
> On Mon, Nov 23, 2020 at 1:01 PM Christoph Valentin <<a href="mailto:christoph.valentin@gmx.at" target="_blank">christoph.valentin@gmx.at</a> <mailto:<a href="mailto:christoph.valentin@gmx.at" target="_blank">christoph.valentin@gmx.at</a>>> wrote:<br>
> <br>
> Hi<br>
> This bug is common to many X3D players (even classical non-WebGL X3D players).<br>
> I was used to use following workaround, which worked for all relevant players:<br>
> If I want to USE a DEFd ProtoInstance, I will actually instantiate a <Script> node with USE.<br>
> KR,<br>
> Christoph<br>
> *Gesendet:* Montag, 23. November 2020 um 00:00 Uhr<br>
> *Von:* "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a> <mailto:<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>>><br>
> *An:* "X3D Graphics public mailing list" <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a> <mailto:<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>>><br>
> *Betreff:* [x3d-public] ProtoInstance USE without name<br>
> 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.<br>
> The xml spec at<br>
> <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> <<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>><br>
> does not address USE of ProtoInstances but all examples always have a name attribute.<br>
> Also, in my quite extensive testing of Protos, I did not come across other examples of ProtoInstance elements without a name attribute.<br>
> 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.<br>
> I do not think the xml spec. would be otherwise affected by V.4 ?<br>
> Best, Andreas<br>
<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
</blockquote></div>
</blockquote></div>