[x3d-public] Prelude plus a bit of X3DTidy and X3dToJson stylesheet complaints

John Carlson yottzumm at gmail.com
Thu Oct 26 21:13:52 PDT 2023


Making this patch did not prevent X3dTidy.xslt from adding ulimit and
llimit to tidied output.  I guess they are not obsolete.

$ git diff X3dTidy.xslt
warning: in the working copy of 'X3dTidy.xslt', LF will be replaced by CRLF
the next time Git touches it
diff --git a/X3dTidy.xslt b/X3dTidy.xslt
index 4f4a2ae..f172ff7 100644
--- a/X3dTidy.xslt
+++ b/X3dTidy.xslt
@@ -81,7 +81,7 @@ Recommended tools:
     <!-- TODO fixHAnimHumanoidMetadataDefault -->
     <xsl:param name="fixMetaNamesMatchDublinCore"
><xsl:text>true</xsl:text></xsl:param>
     <xsl:param name="omitNegativeScaleValues"
 ><xsl:text>true</xsl:text></xsl:param>
-    <xsl:param name="omitObsoleteAttributes"
><xsl:text>true</xsl:text></xsl:param><!-- TODO add to X3D-Edit -->
+    <xsl:param name="omitObsoleteAttributes"
><xsl:text>false</xsl:text></xsl:param><!-- TODO add to X3D-Edit -->
     <!-- prependWorldInfoIfMissing values: true, false, or can also
provide name to use -->
     <xsl:param name="prependWorldInfoIfMissing"
 ><xsl:text>true</xsl:text></xsl:param><!-- TODO add to X3D-Edit -->
     <xsl:param name="replaceBlackEmissiveColor"
 ><xsl:text>true</xsl:text></xsl:param>



On Thu, Oct 26, 2023 at 6:49 PM John Carlson <yottzumm at gmail.com> wrote:

> Okay, I am seeing omitObsoleteAttributes in X3dTidy.xslt documentation,
> and stripDefaultAttributes in X3dToJson.xslt documentation, something to
> try out.  I was hoping for a “do not add additional default values” in
> X3dToJson.xslt.  Use the author’s intention.
>
> Is there something to add containerFields where required by X3DJSAIL?  I’m
> working on that in X3DJSONLD.java.
>
> No need to rush to fix these things.  I don’t have a pressing need.
>
> Hmm!
>
> John
>
> On Thu, Oct 26, 2023 at 9:21 AM John Carlson <yottzumm at gmail.com> wrote:
>
>> So I've been working on X3DJSONLD.java JSON to XML conversion.  Since
>> there are many additions through the use of X3dToJson.xslt, namely @ulimit
>> and and @llimit properties which have default values, I cannot properly
>> diff my XML HAnim output against the original XML X3D. I can delete these
>> defaults X3DJSONLD.java and X3DJSONLD.js, but that seems like it's
>> adding some complexity, which perhaps is unnecessary.
>>
>> So I thought, maybe I can use the X3d Tidy spreadsheet to remove these
>> defaults.  Maybe not..
>>
>> Here is the X3d Tidy spreadsheet running against the original
>> KoreanCharacterMotionAnnexD01Jin.x3d, which I believe is here:
>>
>>
>> https://www.web3d.org/x3d-resources/content/examples/HumanoidAnimation/Specifications/KoreanCharacterMotionAnnexD01JinIndex.html
>>
>> I discovered all these ulimit and llimit fields being added to my tidied
>> output! See attached original and tidied XML output. See below for false
>> flags announcing that ulimit and llimit are omitted, when they are not.
>>
>> See:
>>
>>
>> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/components/hanim.html#HAnimJoint
>>
>> For ulimit and llimit defaults.
>>
>> I am using Saxon as packaged with X3DJSAIL.  I am not testing with the
>> latest X3DJSAIL jar, but I'll download that now.
>>
>> Thanks!
>>
>> John
>>
>> batchtidy:
>>      [echo] Run tidy:
>>     [apply] outdir
>>     [apply] BEGIN
>> C:\Users\john\x3dschema\examples\KoreanCharacterMotionAnnexD01Jin.x3d
>>     [apply] out
>> C:\Users\john\x3dschema\examples\KoreanCharacterMotionAnnexD01Jin.tidy.new.xml
>>     [apply] *** HAnimJoint USE='hanim_humanoid_root'
>> containerField='joints' has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_humanoid_root'
>> containerField='joints' has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_sacroiliac' containerField='joints'
>> has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_sacroiliac' containerField='joints'
>> has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_vl5' containerField='joints' has
>> disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_vl5' containerField='joints' has
>> disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_skullbase' containerField='joints'
>> has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_skullbase' containerField='joints'
>> has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_elbow' containerField='joints'
>> has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_elbow' containerField='joints'
>> has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_elbow' containerField='joints'
>> has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_elbow' containerField='joints'
>> has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_hip' containerField='joints' has
>> disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_hip' containerField='joints' has
>> disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_hip' containerField='joints' has
>> disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_hip' containerField='joints' has
>> disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_knee' containerField='joints' has
>> disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_knee' containerField='joints' has
>> disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_knee' containerField='joints' has
>> disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_knee' containerField='joints' has
>> disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_metatarsophalangeal_2'
>> containerField='joints' has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_metatarsophalangeal_2'
>> containerField='joints' has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_metatarsophalangeal_2'
>> containerField='joints' has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_metatarsophalangeal_2'
>> containerField='joints' has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_radiocarpal'
>> containerField='joints' has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_radiocarpal'
>> containerField='joints' has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_radiocarpal'
>> containerField='joints' has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_radiocarpal'
>> containerField='joints' has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_shoulder' containerField='joints'
>> has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_shoulder' containerField='joints'
>> has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_shoulder' containerField='joints'
>> has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_shoulder' containerField='joints'
>> has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_talocrural'
>> containerField='joints' has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_l_talocrural'
>> containerField='joints' has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_talocrural'
>> containerField='joints' has disallowed attribute llimit='0 0 0', now omitted
>>     [apply] *** HAnimJoint USE='hanim_r_talocrural'
>> containerField='joints' has disallowed attribute ulimit='0 0 0', now omitted
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply]
>> C:\Users\john\x3dschema\examples\KoreanCharacterMotionAnnexD01Jin.tidy.new.xml
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply] *** containerField mismatch - found it #3 containerField
>> DEF='' containerField='segments' expectedContainerField='segments'
>>     [apply]
>> =======================================================================================================
>>     [apply] HAnimHumanoid skeleton holds X3D4 HAnim2 triplets, HAnimJoint
>> (18) : HAnimSegment (18) : HAnimSite (0)
>>     [apply]
>> =======================================================================================================
>>     [apply] HAnimHumanoid DEF='hanim_AnnexD01Jin name='AnnexD01Jin'
>> loa='-1'
>>     [apply]   humanoid_root : sacrum
>>     [apply]     sacroiliac : pelvis
>>     [apply]       l_hip : l_thigh
>>     [apply]       | l_knee : l_calf
>>     [apply]       |   l_talocrural : l_talus
>>     [apply]       |     l_metatarsophalangeal_2 :
>> l_tarsal_proximal_phalanx_2
>>     [apply]       r_hip : r_thigh
>>     [apply]       | r_knee : r_calf
>>     [apply]       |   r_talocrural : r_talus
>>     [apply]       |     r_metatarsophalangeal_2 :
>> r_tarsal_proximal_phalanx_2
>>     [apply]       vl5 : l5
>>     [apply]         skullbase : skull
>>     [apply]         l_shoulder : l_upperarm
>>     [apply]         | l_elbow : l_forearm
>>     [apply]         |   l_radiocarpal : l_carpal
>>     [apply]         r_shoulder : r_upperarm
>>     [apply]           r_elbow : r_forearm
>>     [apply]             r_radiocarpal : r_carpal
>>     [apply]
>> =======================================================================================================
>>     [apply] END
>> C:\Users\john\x3dschema\examples\KoreanCharacterMotionAnnexD01Jin.x3d
>>
>> BUILD SUCCESSFUL
>> Total time: 3 seconds
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231026/ad2cdbd0/attachment-0001.html>


More information about the x3d-public mailing list