<div dir="auto"><div dir="auto">To begin to address validation of short syntax instances, it may be possible, as John also noted, to first transform, perhaps with xslt, each such node in a x3d document to long, traditional syntax and then validate that result.</div><div dir="auto"><br></div><div dir="auto">Since automatically generated long ProtoInstance syntax should always be valid x3d, the value would come from detecting problems during the transformation process, and from making it possible to validate the complete document.</div><div dir="auto"><br></div><div dir="auto">One drawback is that mistyped native nodes would be interpreted as proto instances and may escape invalidation. This is somewhat similar to long form mistyped Proto instance names also escaping invalidation as long as there is no full parsing of proto declarations.</div><div dir="auto"><br></div><div dir="auto">To work around this, documents which wish to be more strictly validated could be required to tag short syntax instances by a metadata convention, by an additional XML attribute or by a naming convention:</div><div dir="auto"><br></div><div dir="auto"><ProtoTable proto='true' ... /></div><div dir="auto"><br></div><div dir="auto">This way validation could distinguish between nodes with intentional and unintentional names. </div><div dir="auto"><br></div><div dir="auto">Andreas </div><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sat, May 10, 2025, 5:26 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">andreasplesch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="auto"><div>I actually think I have never tested when a Proto has the same name as a native node in x3dom.</div><div><br></div><div>Here is an example for 'Box':</div><div><br></div><div><a href="https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/5e2c6068d0495605198f9a20254c7519/raw/91ee41a9afbb8ee9dec5952108bf13bdc41f4de0/ProtoBoxCollision.x3d" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/5e2c6068d0495605198f9a20254c7519/raw/91ee41a9afbb8ee9dec5952108bf13bdc41f4de0/ProtoBoxCollision.x3d</a></div><div><br></div><div>It appears that the Proto redefinition takes precedence.</div><div><br></div><div>Here is an example for 'Group':</div><div><br></div><div><a href="https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/5e2c6068d0495605198f9a20254c7519/raw/3b7a53131c0c890b9672b38ae083c81c8524d60e/ProtoNativeCollisionTest.x3d" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/5e2c6068d0495605198f9a20254c7519/raw/3b7a53131c0c890b9672b38ae083c81c8524d60e/ProtoNativeCollisionTest.x3d</a></div><div><br></div><div>This is more complicated but I think the Proto definition still takes precedence except that now only the first child of the type transform is rendered.</div><div><br></div><div>I would suggest letting browser behaviour for that case remain undefined to discourage authors to somehow cleverly apply such a feature.</div><div><br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 10, 2025, 3:39 PM <<a href="mailto:x3d-public-request@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public-request@web3d.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Date: Sat, 10 May 2025 21:37:47 +0200<br>
From: Holger Seelig <<a href="mailto:holger.seelig@yahoo.de" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">holger.seelig@yahoo.de</a>><br>
To: X3D <<a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a>><br>
Subject: Re: [x3d-public] Simplifying ProtoInstance nodes<br>
Message-ID: <<a href="mailto:67EB2216-BC2C-4A50-9E57-122241628399@yahoo.de" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">67EB2216-BC2C-4A50-9E57-122241628399@yahoo.de</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
There is another drawback which already exist in VRML encoding. What take precedence if a PROTO is named as a build-in node. Consider a PROTO named Box with a Sphere as root node. What is happening if a Box is now instantiated?<br>
<br>
PROTO Box []<br>
{<br>
Sphere {}<br>
}<br>
<br>
Shape {<br>
Box {}<br>
}<br>
<br>
This behaviour is not handled by the specification, but X_ITE does the following: build-in nodes will take precedence over over PROTO nodes, it will still display a Box node. Don?t know what Caste or X3DOM does. With current XML encoding this is very cleared and there is no prob at all. But in VRML encoding or with XML ?short syntax? this may be worth a spec comment.<br>
<br>
Best regards,<br>
Holger <br>
<br>
--<br>
Holger Seelig<br>
Leipzig, Germany<br>
<br>
<a href="mailto:holger.seelig@yahoo.de" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">holger.seelig@yahoo.de</a><br>
<a href="https://create3000.github.io/x_ite/" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://create3000.github.io/x_ite/</a><br>
<a href="https://patreon.com/X_ITE" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://patreon.com/X_ITE</a><br>
<br>
<br>
<br>
> Am 10.05.2025 um 20:44 schrieb Brutzman, Donald (Don) (CIV) via x3d-public <<a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a>>:<br>
> <br>
> +1 on all counts, thanks for thoughtful consideration Michalis.<br>
> <br>
> Further considerations are always welcome.<br>
> <br>
> Next week Dick and I will review comments, then consider a Mantis issue and draft prose addition to X3D XML Encoding.<br>
> <br>
> all the best, Don<br>
> --<br>
> Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" 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="https://faculty.nps.edu/brutzman" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://faculty.nps.edu/brutzman</a><br>
> <br>
> <br>
> From: Michalis Kamburelis<br>
> Sent: Saturday, May 10, 2025 11:38 AM<br>
> To: Extensible 3D (X3D) Graphics public discussion<br>
> Cc: Brutzman, Donald (Don) (CIV)<br>
> Subject: Re: [x3d-public] Simplifying ProtoInstance nodes <br>
> <br>
> I think this short form (in XML encoding) makes sense, and Castle Game Engine / Castle Model Viewer could support it too.<br>
> <br>
> It makes XML encoding and classic encoding more consistent: you can use PROTO to define a new node, and then use the new node with the same syntax as "built-in nodes". This is already true for classic encoding, it's nice to bring this feature to XML encoding.<br>
> <br>
> Don has already expressed the important drawback of this "short form": such XML will not validate. I mean, it will validate in X3D-specific tools like "castle-model-converter --validate .." (once we add support for it), but the general XML validation using XML Schema has no way of validating it. You cannot tell in XML schema "this XML element name is valid, if defined by some XML attribute elsewhere". I'm guessing this was the whole reason why ProtoInstance, fieldValue etc. were invented in XML encoding.<br>
> <br>
> I'm guessing in JSON X3D encoding, the consideration will be similar: it can be implemented, but the resulting file will not validate with JSON schema ( <a href="https://json-schema.org/" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://json-schema.org/</a> ).<br>
> <br>
> Anyhow, if we're all fine with accepting this drawback, then we sure can go ahead and add it to spec :) As long as "long form" remains available, and thus tools like XML schema and JSON schema remain useful, I think it makes sense to have this choice.<br>
> <br>
> Regards,<br>
> Michalis<br>
> <br>
> sob., 10 maj 2025 o 18:38 Brutzman, Donald (Don) (CIV) via x3d-public <<a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a> <mailto:<a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a>>> napisa?(a):<br>
> Thanks for the interesting, innovative discussion. Excerpting the example:<br>
> <br>
> <a href="https://create3000.github.io/x_ite/tutorials/creating-new-node-types/#using-prototyped-nodes" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://create3000.github.io/x_ite/tutorials/creating-new-node-types/#using-prototyped-nodes</a><br>
> <br>
> _________________________<br>
> XML Encoding<br>
> 1<br>
> 2<br>
> 3<br>
> 4<br>
> 5<br>
> 6<br>
> 7<br>
> 8<br>
> 9<br>
> <!-- Official Syntax --><br>
> <ProtoInstance name='BouncingBall'><br>
> <fieldValue name='cycleInterval' value='2'/><br>
> <fieldValue name='bounceHeight' value='3'/><br>
> </ProtoInstance><br>
> <!-- Short Syntax --><br>
> <BouncingBall<br>
> cycleInterval='2'<br>
> bounceHeight='3'/><br>
> Classic VRML Encoding<br>
> 1<br>
> 2<br>
> 3<br>
> 4<br>
> BouncingBall {<br>
> cycleInterval 2.0<br>
> bounceHeight 3.0<br>
> }<br>
> _________________________<br>
> <br>
> One drawback with the "short" XML syntax is that it will not pass XML DOCTYPE or XML Schema validation, although it still must conform to XML well-formed rules. Additional tool-specific capabilities can check for such correctness during parsing, of course. Avoiding XML validation relaxes quality assurance (QA) for the entire scene, not just that prototype instance, and so use of the short form should be considered carefully.<br>
> <br>
> Of course there is much merit too, not least of which are readability and consistency with other XML-encoded nodes.<br>
> <br>
> As it turns out, now is a good time to consider such a change to the X3D Standards suite. We have highly mature documents defining X3D encodings using XML and ClassicVRML syntax. Conceivably a "short" form for ProtoInstance will carry over satisfactorily for JSON and other encodings as well, when we get to them this fall.<br>
> <br>
> If X_ITE and X3DOM already handle this form, and if Castle Model Viewer (Castle Game Engine) is also supportive, I'm not yet seeing any blockers to adoption. Further implementation and evaluation of course will be useful<br>
> <br>
> Reference and specific clause that would need modification:<br>
> <br>
> X3D XML Encoding 4.0 <<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/X3D_XML.html" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/X3D_XML.html</a>> revision 19776-1<br>
> 4.3.3.2 ProtoInstance node and fieldValue statement syntax<br>
> <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/concepts.html#ProtoInstanceAndFieldValueStatement" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/concepts.html#ProtoInstanceAndFieldValueStatement</a><br>
> <br>
> Probably no changes needed:<br>
> <br>
> X3D Classic VRML Encoding 4.0 <<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-2v4.0-WD1/Part02/X3D_ClassicVRML.html" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-2v4.0-WD1/Part02/X3D_ClassicVRML.html</a>> revision 19776-2<br>
> 4.3.3.2 Prototype instances and field value initialization syntax<br>
> <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-2v4.0-WD1/Part02/concepts.html#ProtoInstanceAndFieldValueStatement" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-2v4.0-WD1/Part02/concepts.html#ProtoInstanceAndFieldValueStatement</a><br>
> <br>
> X3D Architecture 4.1 <<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/Architecture.html" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/Architecture.html</a>>, revision 19775-1<br>
> 4.4.4 Prototype semantics<br>
> <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/concepts.html#PrototypeSemantics" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/concepts.html#PrototypeSemantics</a><br>
> <br>
> Thanks for careful consideration of this potential capability. All feedback welcome.<br>
> <br>
> Have fun with X3D extensibility! ?<br>
> <br>
> all the best, Don<br>
> --<br>
> Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" 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="https://faculty.nps.edu/brutzman" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://faculty.nps.edu/brutzman</a><br>
> <br>
> <br>
> From: x3d-public on behalf of Holger Seelig via x3d-public<br>
> Sent: Saturday, May 10, 2025 1:13 AM<br>
> To: X3D<br>
> Cc: Holger Seelig<br>
> Subject: Re: [x3d-public] Simplifying ProtoInstance nodes<br>
> <br>
> This is already possible if you use the ?short syntax? of a proto instance:<br>
> <br>
> <a href="https://create3000.github.io/x_ite/tutorials/creating-new-node-types/#using-prototyped-nodes" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://create3000.github.io/x_ite/tutorials/creating-new-node-types/#using-prototyped-nodes</a><br>
> <br>
> You can use this in X_ITE, but also in X3DOM.<br>
> <br>
> Best regards,<br>
> Holger<br>
> <br>
> --<br>
> Holger Seelig<br>
> Leipzig, Germany<br>
> <br>
> <a href="mailto:holger.seelig@yahoo.de" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">holger.seelig@yahoo.de</a> <mailto:<a href="mailto:holger.seelig@yahoo.de" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">holger.seelig@yahoo.de</a>><br>
> <a href="https://create3000.github.io/x_ite/" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://create3000.github.io/x_ite/</a><br>
> <a href="https://patreon.com/X_ITE" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://patreon.com/X_ITE</a><br>
> <br>
> <br>
> <br>
> Am 10.05.2025 um 05:55 schrieb John Carlson via x3d-public <<a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a> <mailto:<a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a>>>:<br>
> <br>
> My thought is to replace ?ProtoInstance? tags with ?MenuItem? tags, and fieldValue statements with attributes, but I?ve not done that before. My goal is to make the model more accessible to screen readers.<br>
> <br>
> Any examples are welcome.<br>
> <br>
> See attached link and model.<br>
> <br>
> John<br>
> <br>
> ---------- Forwarded message ---------<br>
> From: John Carlson <<a href="mailto:yottzumm@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">yottzumm@gmail.com</a>>><br>
> Date: Thu, Mar 6, 2025 at 4:35?PM<br>
> Subject: Latest cleaned Jin FACS (needs metadata)<br>
> To: Don Brutzman <<a href="mailto:brutzman@nps.edu" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">brutzman@nps.edu</a>>>, Joe D Williams <<a href="mailto:joedwil@earthlink.net" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">joedwil@earthlink.net</a> <mailto:<a href="mailto:joedwil@earthlink.net" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">joedwil@earthlink.net</a>>><br>
> <br>
> <br>
> Attached.<br>
> <br>
> And:<br>
> <a href="https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d</a><br>
> <br>
> John<br>
> <CleanedYouClocks.x3d>_______________________________________________<br>
> x3d-public mailing list<br>
> <a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a> <mailto:<a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a>><br>
> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
> <br>
> _______________________________________________<br>
> x3d-public mailing list<br>
> <a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a> <mailto:<a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a>><br>
> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
> _______________________________________________<br>
> x3d-public mailing list<br>
> <a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a><br>
> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250510/e81345db/attachment.html" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250510/e81345db/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br>
<br>
------------------------------<br>
<br>
End of x3d-public Digest, Vol 194, Issue 27<br>
*******************************************<br>
</blockquote></div></div>
</div>
</blockquote></div></div>