<div dir="ltr"><div dir="ltr"><div dir="ltr">If this is being reviewed for file size, I need a disability accommodation to allow it. Apparently I cannot communicate properly without images.</div><div dir="ltr"><div><br></div><div>There are probably thousands of X3D archive that are wrong, they use a string to represent an MFString instead of an array, including this one:</div><div><br></div><div><a href="https://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/Appearance/ImageTextureChild.json" target="_blank">web3d.org/x3d/content/examples/ConformanceNist/Appearance/Appearance/ImageTextureChild.json</a></div><div><br></div><div>Here's a snapshot:</div><div><br></div><div><img src="cid:ii_m4v2lpt60" alt="image.png" width="562" height="200"></div><div><br></div><div>I am not sure about the green part of the patch below, but @transitionType an X3D MFString that's an array in X3D JSON schema as well. Please test the patched X3dToJson.xlst with @transitionType.</div><div>My JSON files do not contain transitionType, so I haven't tested that with X3D JSON schema. What I see in the X3D JSON zip on X3D resources examples is a string array for @transitionType. Why is @transitionType rendered differently than @type in the zip archive?</div><div><br></div><div>Here's an example that has the NavigationInfo @type as an array, not an string:</div><div><br></div><div><a href="https://www.web3d.org/x3d/stylesheets/X3dToJson.html" target="_blank">https://www.web3d.org/x3d/stylesheets/X3dToJson.html</a></div><div><br></div><div><img src="cid:ii_m4v30b0b1" alt="image.png" width="357" height="551"><br></div><div><br></div><div>Yet the stylesheet on sourceforge doesn't produce that, as evidenced by the JSON in the first image.</div><div><br></div><div>I have a vision problem too. It happens.</div><div><br></div><div>I think Holger will stand by me to say that all MFStrings in JSON should be arrays, not strings.</div><div><br></div><div>The reason this is coming up is because I continually have to patch X3dToJson.xslt for new changes to fix output. I am considering switching back to Holger's x3d-tidy, but the command line options are not as suitable as I like for batch files, and I may fork it instead. So I can either maintain my own stylesheet, or my own x3d-tidy. I already have a working stylesheet.</div><div><br></div><div>John</div><div><br></div><div><br class="gmail-Apple-interchange-newline">Here are changes to make NavigationType @type in X3D JSON validatable with X3D JSON schema.</div><div><div><br></div><div>$ diff -c /c/Users/jcarl/<a href="http://www.web3d.org/x3d/stylesheets/X3dToJson.xslt" target="_blank">www.web3d.org/x3d/stylesheets/X3dToJson.xslt</a> ./X3dToJson.xslt<br>*** /c/Users/jcarl/<a href="http://www.web3d.org/x3d/stylesheets/X3dToJson.xslt" target="_blank">www.web3d.org/x3d/stylesheets/X3dToJson.xslt</a> 2024-12-18 22:11:31.726779000 -0600<br>--- ./X3dToJson.xslt 2024-12-19 00:15:58.877419300 -0600<br>***************<br>*** 1017,1023 ****<br> <xsl:text>"</xsl:text><br> </xsl:when><br> <!-- single string --><br>! <xsl:when test="($attributeType = 'SFString') or<br> not(local-name() ='url') and not(ends-with(local-name(),'Url')) and<br> ((local-name()='value') and<br> ((contains(local-name(../..),'Proto') or contains(local-name(../../..),'Proto')) and<br>--- 1017,1024 ----<br> <xsl:text>"</xsl:text><br> </xsl:when><br> <!-- single string --><br>! <xsl:when test="not((local-name(..)='NavigationInfo') and ((local-name()='type')<font color="#00ff00"> or (local-name()='transitionType')))</font><br>! and (($attributeType = 'SFString') or<br> not(local-name() ='url') and not(ends-with(local-name(),'Url')) and<br> ((local-name()='value') and<br> ((contains(local-name(../..),'Proto') or contains(local-name(../../..),'Proto')) and<br>***************<br>*** 1027,1033 ****<br> (local-name()='name') or (local-name()='description') or (local-name()='accessType') or<br> (local-name()='marking') or (local-name()='description') or<br> (local-name()='nodeField') or (local-name()='protoField') or<br>! ((local-name()='type') and not(local-name(..)='NavigationInfo')))<br> "><br> <!-- debug --><br> <xsl:if test="$debugTrace"><br>--- 1028,1034 ----<br> (local-name()='name') or (local-name()='description') or (local-name()='accessType') or<br> (local-name()='marking') or (local-name()='description') or<br> (local-name()='nodeField') or (local-name()='protoField') or<br>! ((local-name()='type') and not(local-name(..)='NavigationInfo'))))<br> "><br> <!-- debug --><br> <xsl:if test="$debugTrace"></div></div></div>
</div>
</div>