[x3d-public] JSON Schema meeting minutes
John Carlson
yottzumm at gmail.com
Sat Oct 30 23:19:11 PDT 2021
On 10/30/21 17:51, Joseph D Williams wrote:
>
> For me, the JSON should be standardized when it can be clearly shown
> to be an accurate set of rules when transcoding between the XML, the
> Classic, and the JSON, given the idea that the XML is the defining
> schema. That is, for a given set of data, equivalent results can be
> produced to and from equivalent data in other standard forms.
>
Our tools are not yet adequate to test this. Roundtripping has been
done, but we're still investigating XML -> JSON -> XML (via X3DJSAIL).
I personally have done roundtripping and some investigation. We will
need to focus on a few examples instead of the whole archive.
Here are some changes that I see worthwhile:
www.web3d.org/x3d/stylesheets$ svn diff X3dTo*.xslt
Index: X3dToJson.xslt
===================================================================
--- X3dToJson.xslt (revision 32565)
+++ X3dToJson.xslt (working copy)
@@ -359,7 +359,7 @@
<xsl:text>
</xsl:text>
<xsl:call-template
name="print-indent"><xsl:with-param name="indent"
select="$indent+4"/></xsl:call-template>
<!-- TODO no guidance yet on how to
properly mark the governing schema within a JSON file at
http://json-schema.org -->
- <xsl:text>"JSON
schema":"https://www.web3d.org/specifications/x3d-3.3-JSONSchema.json"</xsl:text>
+ <xsl:text>"JSON
schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.json"</xsl:text>
<xsl:text>,</xsl:text>
</xsl:if>
Index: X3dToNodeJS.xslt
===================================================================
--- X3dToNodeJS.xslt (revision 32565)
+++ X3dToNodeJS.xslt (working copy)
@@ -299,7 +299,8 @@
}
}
</xsl:text><!-- class complete -->
-<xsl:text>new </xsl:text><xsl:value-of
select="$newClassName"/><xsl:text>().main();</xsl:text>
+<xsl:text>new </xsl:text><xsl:value-of
select="$newClassName"/><xsl:text>().main();
+process.exit(0);</xsl:text>
</xsl:template>
@@ -2243,9 +2244,22 @@
<xsl:if test="(local-name() = 'class')">
<xsl:text>Css</xsl:text><!--
method prefix -->
</xsl:if>
+ <xsl:if test="(local-name() = 'style')">
+ <xsl:text>Css</xsl:text><!--
method prefix -->
+ </xsl:if>
+ <xsl:if test="(local-name() = 'id')">
+ <xsl:text>Html</xsl:text><!--
method prefix -->
+ </xsl:if>
<!-- upper camel case -->
- <xsl:value-of
select="translate(substring(name(),1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
- <xsl:value-of
select="substring(name(),2)"/>
+ <xsl:if test="(local-name() = 'id')">
+ <xsl:value-of
select="translate(substring(name(),1,2),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+ </xsl:if>
+
+ <xsl:if test="(local-name() != 'id')">
+ <xsl:value-of
select="translate(substring(name(),1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+ <xsl:value-of
select="substring(name(),2)"/>
+ </xsl:if>
+
<xsl:text>(</xsl:text>
<xsl:variable name="nodeNumber"
select="count(../preceding::*) + 1"/>
www.web3d.org/x3d/stylesheets$ svn diff
CreateX3dSceneAccessInterfaceJava.xslt
Index: CreateX3dSceneAccessInterfaceJava.xslt
===================================================================
--- CreateX3dSceneAccessInterfaceJava.xslt (revision 32565)
+++ CreateX3dSceneAccessInterfaceJava.xslt (working copy)
@@ -35831,7 +35831,21 @@
childElementName.equals("GeoMetadata") || childElementName.equals("ImageCubeMapTexture") || childElementName.equals("ImageTexture3D") ||
childElementName.equals("ImageTexture") || childElementName.equals("Inline") || childElementName.equals("MovieTexture") ||
childElementName.equals("PackagedShader") || childElementName.equals("Script") || childElementName.equals("ShaderPart") ||
-
childElementName.equals("ShaderProgram"))
+
childElementName.equals("ShaderProgram")
+|| childElementName.equals("Anchor")
+|| childElementName.equals("Inline")
+|| childElementName.equals("DISEntityTypeMapping")
+|| childElementName.equals("GeoMetadata")
+|| childElementName.equals("AudioClip")
+|| childElementName.equals("ImageCubeMapTexture")
+|| childElementName.equals("ImageTexture3D")
+|| childElementName.equals("ImageTexture")
+|| childElementName.equals("MovieTexture")
+|| childElementName.equals("Script")
+|| childElementName.equals("PackagedShader")
+|| childElementName.equals("ShaderPart")
+|| childElementName.equals("ShaderProgram")
+)
&&
(containerField.equals("children") || containerField.equals("watchList")
|| containerField.equals("texture") || containerField.equals("programs") ||
containerField.equals("parts") || containerField.equals("mapping") || containerField.equals("shaders") || containerField.equals("source"))) // children is new
name in X3D4, otherwise still a common, unambiguous error
((LoadSensor)elementObject).addChildren((X3DNode) childX3dElement); // formerly addWatchList in X3D3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211031/b1536a6e/attachment.html>
More information about the x3d-public
mailing list