<div dir="ltr">Okay. I have a "schema" which is JSON, but I've not confirmed that it passes JSON meta-schema:<div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/specifications/X3dUnifiedObjectModel-4.1.json">https://github.com/coderextreme/X3DJSONLD/blob/master/src/specifications/X3dUnifiedObjectModel-4.1.json</a></div><div><br></div><div>(sorry, bad name, please rename if you download it. I will need to make modifications to my Java code in order to change the base name).</div><div><br></div><div>I have also not confirmed if it validates any "X3D" JSON. That is next.</div><div><br></div><div>The modified XSLT which generates the schema from X3DUOM (imperfectly) is here:</div><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/xslt/generateJSONschema2020-12.xslt">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/xslt/generateJSONschema2020-12.xslt</a></div><div>I have gone into the schema and made edits, because I can't figure out the logic to or not to put a comma after the default value in JSON Schema. The logic involved is here:</div><div><br></div><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/23a53eb9f8835632fcad0a55087c86f284271fbb/src/main/xslt/generateJSONschema2020-12.xslt#L328">https://github.com/coderextreme/X3DJSONLD/blob/23a53eb9f8835632fcad0a55087c86f284271fbb/src/main/xslt/generateJSONschema2020-12.xslt#L328</a></div><div><br></div><div>Copied below:</div><div> <xsl:if test="<br> not($fieldName = 'language' and local-name() = 'PackagedShader' and not(@default)) and<br> not($fieldName = 'language' and local-name() = 'ProgramShader' and not(@default)) and<br> not($fieldName = 'language' and local-name() = 'X3DShaderNode' and not(@default)) and<br> not($fieldName = 'name' and local-name() = 'meta' and not(@default)) and<br> not($fieldName = 'name' and local-name() = 'HAnimDisplacer' and not(@default)) and<br> not($fieldName = 'name' and local-name() = 'HAnimJoint' and not(@default)) and<br> not($fieldName = 'name' and local-name() = 'HAnimSegment' and not(@default)) and<br> not($fieldName = 'name' and local-name() = 'HAnimSite' and not(@default)) and<br> (<br> $fieldType = 'SFColor' or<br> $fieldType = 'SFColorRGBA' or<br> $fieldType = 'SFDouble' or<br> $fieldType = 'SFFloat' or<br> $fieldType = 'SFImage' or<br> $fieldType = 'SFInt32' or<br> $fieldType = 'SFMatrix3f' or<br> $fieldType = 'SFMatrix4f' or<br> $fieldType = 'SFRotation' or<br> $fieldType = 'SFTime' or<br> $fieldType = 'SFVec2f' or<br> $fieldType = 'SFVec3d' or<br> $fieldType = 'SFVec3f' or<br> $fieldType = 'SFVec4f' or<br> @default = 'NULL' or<br> @default = '-1' or<br> @default = '0' or<br> @default = '1' or<br> @default = '2.0' or<br> @default = '3' or<br> @default = '4.0' or<br> @default = 'false' or<br> @default = 'true' or<br> @default = 'AUTO' or<br> @default = 'BASIC' or<br> @default = 'CONSTANT' or<br> @default = 'FASTEST' or<br> @default = 'Full' or<br> @default = 'INVERSE' or<br> @default = 'LINEAR' or<br> @default = 'LOWPASS' or<br> @default = 'MATCH_ANY' or<br> @default = 'MAX' or<br> @default = 'NONE' or<br> @default = 'PIE' or<br> @default = 'PLAIN' or<br> @default = 'REPEAT' or<br> @default = 'SPEAKERS' or<br> @default = 'SPHERE' or<br> @default = 'SQUARE' or<br> @default = 'localhost' or<br> @default = 'standAlone' or<br> (@default != 'BOUNDS' and @default != 'CLOSEST' and not(@default)))"><br> <xsl:text>, </xsl:text></div><div><br></div><div>Frankly, I am puzzled. The problem involves absent default values for meta name, shader language and HAnim name fields.</div><div><br></div><div>If someone wants to help with my logic, great.</div><div><br></div><div>I created a shell script to run the stylesheet, here:</div><div><br></div><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/shell/schema.sh">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/shell/schema.sh</a></div><div><br></div><div>The stylesheet should work with any XSLT 2.0 processor.</div><div><br></div><div>Note that this schema varies wildly from the one generated by python. I'm not quite sure why Claude.ai borked. It was a one shot deal. What I can do is try with X3DUOM, the Python XSLT generator, and a real JSON schema next (lots of tokens).</div><div><br></div><div>John</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Jan 25, 2026 at 1:27 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:1px solid rgb(204,204,204);padding-left:1ex">First cut at an XSLT stylesheet for converting X3DUOM to JSON schema.<div dir="auto"><br></div><div dir="auto">It’s got a web3d license.</div><div dir="auto"><br></div><div dir="auto">I’ve not tried it at all, that takes more work! It’s 3/7th’s the size of the python, so that’s impressive!</div><div dir="auto"><br></div>
</blockquote></div>