[x3d-public] Fwd: Java generated HAnim XML (long)

John Carlson yottzumm at gmail.com
Thu Jan 4 09:25:52 PST 2024


3 people have asked me to return to the list.

---------- Forwarded message ---------
From: John Carlson <yottzumm at gmail.com>
Date: Thu, Jan 4, 2024 at 1:43 AM
Subject: Re: Java generated HAnim XML (long)
To: Joe D Williams <joedwil at earthlink.net>, Vincent Marchetti <
vmarchetti at ameritech.net>


Here are patches to the X3DJSAIL stylesheet for HAnim (not metadata). This
sorts skeleton first in HAnimHumanoid, and adds viewpoints to HAnimSite
containerField values

This is the final repairs X3DJSAIL to my DiamondLOA0.java.  I have other
HAnim figures (my own) which are blowing up now, and I will pursue those. I
am not pursuing changes to X3dToJava.xslt yet. I think the fix is really in
X3DJSAIL stylesheet.  I am satisfied with setContainerFieldOverride for
now. If we don't want to rewrite all the Java in the archive, there will be
further changes to X3DJSAIL such that setContainerFieldOverride is
not needed in the external API. I don't know how hard or easy it will be or
if I will be able to accomplish it.  We have an adequate workaround now,
for DiamondLOA0.java (my version, with XML output).

John

svn diff CreateX3dSceneAccessInterfaceJava.xslt
Index: CreateX3dSceneAccessInterfaceJava.xslt
===================================================================
--- CreateX3dSceneAccessInterfaceJava.xslt      (revision 35811)
+++ CreateX3dSceneAccessInterfaceJava.xslt      (working copy)
@@ -3842,7 +3842,7 @@

                    <xsl:text>, "segments" /*HAnimHumanoid
parent*/</xsl:text>

            </xsl:when>

            <xsl:when test="starts-with($name,'HAnimSite')">
-
                     <xsl:text>, "sites" /*HAnimHumanoid parent*/,
"skeleton" /*HAnimHumanoid parent*/</xsl:text>
+
                     <xsl:text>, "sites" /*HAnimHumanoid parent*/,
"viewpoints" /*HAnimHumanoid parent*/, "skeleton" /*HAnimHumanoid
parent*/</xsl:text>

            </xsl:when>

            <xsl:when test="starts-with($name,'HAnimMotion')">

                    <xsl:text>, "motions" /*HAnimHumanoid
parent*/</xsl:text>
@@ -13828,11 +13828,12 @@

                                            ((@accessType='initializeOnly')
or (@accessType='inputOutput')) and
                                                             not(@name =
'meta')]">
                                <!-- order is essential for elements,
xsl:sort results in reverse order -->
-                               <xsl:sort select="@name[not((. = 'head') or
(. = 'Scene') or (. = 'ProtoBody') or (. = 'ProtoInterface') or (. = 'IS')
or (. = 'field') or (. = 'metadata'))]"/>
+                               <xsl:sort select="@name[not((. = 'head') or
(. = 'skeleton') or (. = 'Scene') or (. = 'ProtoBody') or (. =
'ProtoInterface') or (. = 'IS') or (. = 'field') or (. = 'metadata'))]"/>
                                <!-- special order for head elements: meta
comes last -->
                                <!-- sort head before Scene in X3D -->
                                <xsl:sort select="(@name = 'Scene')"/>
                                <xsl:sort select="(@name = 'head')"/>
+                               <xsl:sort select="(@name = 'skeleton')"/>
                                <!-- sort ProtoInterface before ProtoBody
in ProtoDeclare -->
                                <xsl:sort select="(@name = 'ProtoBody')"/>
                                <xsl:sort select="(@name =
'ProtoInterface')"/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240104/991615b8/attachment.html>


More information about the x3d-public mailing list