<div dir="auto">I also realize that changing X3DUOM to make ProtoInstance.name required also affects the X3DUOM to X3D JSON schema mapping (the mapping is the product, not the schema) I did some time ago. If there are interested parties, I can redo the mapping. The new mapping will possibly include changes for the X_ITE component, but I still need to undo changes I made to the Tangent node’s component (I switched it to X_ITE from Rendering). Plus, I need to check for X3DUOM updates from Holger.</div><div dir="auto"><br></div><div dir="auto">I believe the mapping lives here:</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/index.html">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/index.html</a></div><div dir="auto"><br></div><div dir="auto">The mapping generator lives here:</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/schemamapping.py">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/schemamapping.py</a></div><div dir="auto"><br></div><div dir="auto">In general, X3DJSONLD beyond X3D JSON schema needs to be upgraded for X_ITE Material node extensions.</div><div dir="auto"><br></div><div dir="auto">I also need to work on handling this: <div dir="auto"><a href="https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models">https://github.com/KhronosGroup/glTF-Sample-Assets/</a></div><div dir="auto"><br></div><div dir="auto">Instead of this:</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/KhronosGroup/glTF-Sample-Models">https://github.com/KhronosGroup/glTF-Sample-Models</a></div><br></div><div dir="auto">This will ensure that X3D JSON schema can handle nearly .x3dj that Holger’s x3d-tidy produces from glTF (yes, I realize converting JSON to JSON is weird).</div><div dir="auto"><br></div><div dir="auto">If anyone wants to add their special nodes to X3D JSON schema, please let me know.</div></div><div dir="auto"><br></div><div dir="auto">John</div></div></div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Dec 29, 2024 at 9:43 AM 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-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Apologies that this comes in the middle of the holidays!</div><div><br></div><div>Don, tread with care when applying the ProtoInstance.name being a required change.</div><div><br></div><div>I don't plan to apply the change to x3dvalidate until the end of February for those who are relying on it. I still need to test changes in X3DJSONLD. This is an advance warning!</div><div><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 29, 2024 at 8:05 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto">Don, thanks for responding.</div><div dir="auto"><br></div><div dir="auto">1. I will try to make name required in ProtoInstance, pending your changes to validation.</div></blockquote><div dir="auto"><br></div><div dir="auto">Upon review, it looks like there are errors in not requiring @name in both ProtoInstance subschemas of X3D JSON schema 4.0. What I did was make ProtoInstance's field /name/ have use="required" in X3DUOM, V4.0. I don't know what will happen with X3D 3.0-3.3 yet. Initial changes indicated that @name is required with nodes without @USE. I made changes to the python to accommodate the ProtoInstance @USE subschema, requiring both @USE and @name for X3D V4.0.</div><div dir="auto"><br></div><div>Original X3D JSON schema 4.0:</div><div dir="auto"><br></div><div dir="auto"> "ProtoInstance": {<br> "type": "object",<br> "oneOf": [<br> {<br> "type": "object",<br> "properties": {<br> "@class": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@name": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@USE": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "-children": {<br> "type": "array",<br> "minItems": 1,<br> "items": {<br> "type": "object",<br> "properties": {<br> "#comment": {<br> "type": "string",<br> "$comment": "#comment statements are the only allowed in -children node when using a USE field"<br> }<br> },<br> "additionalProperties": false<br> }<br> }<br> },<br><font style="color:rgb(255,0,0)"> "required": [<br> "@USE"<br> ],</font><br> "additionalProperties": false<br> },<br> {<br> "type": "object",<br> "properties": {<br> "-children": {<br> "type": "array",<br> "minItems": 1,<br> "items": {<br> "type": "object",<br> "properties": {<br> "#comment": {<br> "type": "string"<br> }<br> },<br> "additionalProperties": false<br> }<br> },<br> "fieldValue": {<br> "$ref": "#/$defs/fieldValue"<br> },<br> "IS": {<br> "$ref": "#/$defs/IS"<br> },<br> "-metadata": {<br> "$ref": "#/$defs/-X3DMetadataObjectSFNode"<br> },<br> "@name": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@DEF": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@class": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@id": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@style": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> }<br> },<br> "additionalProperties": false<br> }<br> ]<br> },</div><div dir="auto"><br></div><div>Here's the new result (Only for X3D V4.0, I will have to edit the python to include other versions). Note that @name is now *required* in all cases, even if @USE is provided.</div><div><br></div><div><br></div><div> "ProtoInstance": {<br> "type": "object",<br> "oneOf": [<br> {<br> "type": "object",<br> "properties": {<br> "@class": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@name": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@USE": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "-children": {<br> "type": "array",<br> "minItems": 1,<br> "items": {<br> "type": "object",<br> "properties": {<br> "#comment": {<br> "type": "string",<br> "$comment": "#comment statements are the only allowed in -children node when using a USE field"<br> }<br> },<br> "additionalProperties": false<br> }<br> }<br> },<br><font style="color:rgb(255,0,0)"> "required": [<br> "@name",<br> "@USE"<br> ],</font><br> "additionalProperties": false<br> },<br> {<br> "type": "object",<br> "properties": {<br> "-children": {<br> "type": "array",<br> "minItems": 1,<br> "items": {<br> "type": "object",<br> "properties": {<br> "#comment": {<br> "type": "string"<br> }<br> },<br> "additionalProperties": false<br> }<br> },<br> "fieldValue": {<br> "$ref": "#/$defs/fieldValue"<br> },<br> "IS": {<br> "$ref": "#/$defs/IS"<br> },<br> "-metadata": {<br> "$ref": "#/$defs/-X3DMetadataObjectSFNode"<br> },<br> "@name": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@DEF": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@class": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@id": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> },<br> "@style": {<br> "$comment": "SFString inputOutput",<br> "type": "string"<br> }<br> },<br><font style="color:rgb(255,0,0)"> "required": [<br> "@name"<br> ],</font><br> "additionalProperties": false<br> }<br> ]<br> },<br></div><div><br></div><div>Since this change is a breaking change, and may invalidate some X3D JSON files, I will wait an amount of time before I implement this change in my repositories, realizing that I may need to check my code in due to a service call on my machine. I suggested *not* upgrading x3dvalidate and X3DJSONLD until you've had a chance to test your JSON.</div><div><br></div><div>Thanks,</div><div><br></div><div>John</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto"></div></blockquote></div></div>
</div>
</div>
</div>
</blockquote></div></div>