[x3d-public] X3dToJson.xslt , Saxon-JS 2 (oil and water) which one is at fault?

John Carlson yottzumm at gmail.com
Mon Jan 11 19:10:28 PST 2021


The following X3DJSONLD files do not process through the below pom.xml
using  `mvn clean install`

The KoreanCharacters were retrieved from X3D resource examples.
HelloWorldProgramOutput.x3d was retrieved from
www.web3d.org/x3d/stylesheets/java/examples after an X3DJSAIL build

I can run without these X3D files, but eventually we will have to fix the
issues.

https://github.com/coderextreme/X3DJSONLD/blob/master/pom.xml

I believe this is a standard way to run stylesheets in maven.   Note the
dependency at the bottom of the file.

Let me know if any version changes have happened in the Saxon version Don
is using.


Thanks!

John

diff --git a/src/main/data/HAnim2SpecificationLOA3Invisible.x3d
b/src/main/data/HAnim2SpecificationLOA3Invisible.x3d
diff --git a/src/main/data/HAnimModelsHandsFeet.x3d
b/src/main/data/HAnimModelsHandsFeet.x3d
diff --git a/src/main/data/HelloWorldProgramOutput.x3d
b/src/main/data/HelloWorldProgramOutput.x3d
diff --git a/src/main/data/JoeKick.x3d b/src/main/data/JoeKick.x3d
diff --git a/src/main/data/JoeProcessed.x3d b/src/main/data/JoeProcessed.x3d
diff --git a/src/main/data/JoeProcessedKick.x3d
b/src/main/data/JoeProcessedKick.x3d
diff --git a/src/main/data/KoreanCharacter01Jin.x3d
b/src/main/data/KoreanCharacter01Jin.x3d
diff --git a/src/main/data/KoreanCharacter02Chul.x3d
b/src/main/data/KoreanCharacter02Chul.x3d
diff --git a/src/main/data/KoreanCharacter03Hyun.x3d
b/src/main/data/KoreanCharacter03Hyun.x3d
diff --git a/src/main/data/KoreanCharacter04Young.x3d
b/src/main/data/KoreanCharacter04Young.x3d
diff --git a/src/main/data/KoreanCharacter05Ju.x3d
b/src/main/data/KoreanCharacter05Ju.x3d
diff --git a/src/main/data/KoreanCharacter06Ga.x3d
b/src/main/data/KoreanCharacter06Ga.x3d
diff --git a/src/main/data/KoreanCharacter07No.x3d
b/src/main/data/KoreanCharacter07No.x3d
diff --git a/src/main/data/KoreanCharacter08Da.x3d
b/src/main/data/KoreanCharacter08Da.x3d
diff --git a/src/main/data/KoreanCharacter09Ru.x3d
b/src/main/data/KoreanCharacter09Ru.x3d
diff --git a/src/main/data/KoreanCharacter10Mi.x3d
b/src/main/data/KoreanCharacter10Mi.x3d
diff --git a/src/main/data/KoreanCharacter11Min.x3d
b/src/main/data/KoreanCharacter11Min.x3d
diff --git a/src/main/data/KoreanCharacter12Sun.x3d
b/src/main/data/KoreanCharacter12Sun.x3d
diff --git a/src/main/data/KoreanCharacterMotionAnnexC01Jin.x3d
b/src/main/data/KoreanCharacterMotionAnnexC01Jin.x3d
diff --git a/src/main/data/KoreanCharacterMotionAnnexD01Jin.x3d
b/src/main/data/KoreanCharacterMotionAnnexD01Jin.x3d
diff --git a/src/main/data/skeleton10.x3d b/src/main/data/skeleton10.x3d
diff --git a/src/main/data/skeletonJoe.x3d b/src/main/data/skeletonJoe.x3d

On Thu, Jan 7, 2021 at 1:29 AM John Carlson <yottzumm at gmail.com> wrote:

> If you can download Saxon-JS 2 xslt3,  it would be good to test XSLT 2.0
> against XSLT 3.0
>
>
>
> If you cannot, IDK
>
>
>
> Attached are results from stylesheet.sh and helloworld.txt, comparing the
> output from xslt3 from Saxonica and saxon9he.jar from Saxonica.
>
>
> I have made all changes you suggested, and changed http: to https: except
> for the 3 HelloWorld*x3d found in HelloWorldScenes (on the sourceforge file
> system).  I do not see the need to download from the web, but I will do
> that now.
>
>
>
>
>
> https://x3dgraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes/
>
>
>
>
>
> I see no difference in the files downloaded from web.
>
>
>
> I’ve identified that this is a problem in X3dToJson.xslt, Saxon-JS 2 or
> Saxon-CE.  Apparently this is not a problem with saxon9he.jar.
>
>
>
> I’m guessing there a problem with the JavaScript implementations of XSLT,
> since saxon9he.jar seems to be working.
>
>
>
> What’s the work around for client-side XSLT?   Can we modify
> X3dToJson.xslt?
>
>
>
> I will probably pursue jsondiff.js next, but I feel like going to bed.
>
>
>
>
>
> This is not a small problem and affects 118 out of 143 of my JSON output
> files.
>
>
>
> I would like to do X3D XML to X3D JSON translation in the browser, and we
> don’t have a good solution for static sites.
>
>
>
> Well, I’m seeing an issue with my Proto Preprocessor.
>
>
>
> GN.
>
>
>
> John
>
>
>
>
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> *From: *Don Brutzman <brutzman at nps.edu>
> *Sent: *Wednesday, January 6, 2021 1:36 PM
> *To: *John Carlson <yottzumm at gmail.com>; X3D Graphics public mailing list
> <x3d-public at web3d.org>
> *Subject: *Re: [x3d-public] X3dToJson.xslt , Saxon-JS 2 (oil and water)
> which one is at fault?
>
>
>
> Hi John.  A good practice is to compare with possible errors in original
> content in order to isolate the cause of difficulties.
>
>
>
> * X3D Resources, Examples: Scene Archives for X3D
>
>    https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples
>
>
>
> Most of the following relationships are demonstrated in
>
>
>
> * X3D Example Archives: X3D4AM, X3D for Advanced Modeling, Hello World
> Scenes, Hello World
>
>
> https://x3dgraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldIndex.html
>
>
>
> *
> https://x3dgraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorld.json
>
>
>
> which has been successfully converted from HelloWorld.x3d by X3dToJson.xslt
>
>
>
> On 1/6/2021 7:37 AM, John Carlson wrote:
>
> >
>
> > Okay, I took all my X3D data files and shoved them through Saxon-JS 2:
>
> >
>
> > $ npm install -g xslt3
>
> >
>
> > $ cat skeleton.sh
>
> >
>
> > for i in `ls ../data/*.x3d| grep -v new`
>
> >
>
> > do
>
> >
>
> > echo ../../../node_modules/.bin/xslt3 -xsl:/c/x3d-code/
> www.web3d.org/x3d/stylesheets/X3dToJson.xslt -s:$i -o:`dirname
> $i`/`basename $i .x3d`.json2
>
> >
>
> > ../../../node_modules/.bin/xslt3 -xsl:/c/x3d-code/
> www.web3d.org/x3d/stylesheets/X3dToJson.xslt -s:$i -o:`dirname
> $i`/`basename $i .x3d`.json2
>
> >
>
> > Done
>
> >
>
> > There are many errors like:
>
> >
>
> > ../../../node_modules/.bin/xslt3 -xsl:/c/x3d-code/
> www.web3d.org/x3d/stylesheets/X3dToJson.xslt -s:../data/extrusion.x3d
> -o:../data/extrusion.json2
>
> >
>
> > Error: IllegalChildNodeFieldNameNotFound no containerField or field name
> found for the X3D JSON object. Check spelling of node.
>
> >
>
> >    $elementName=Shape, $parentName=Group
>
>
>
> expected value for parent-child relationship is containerField='children'
>
>
>
> >    Please report this error to x3d-public at web3d.org - thanks for your
> help improving X3D Quality Assurance (QA).
>
> >
>
> > Error: IllegalChildNodeFieldNameNotFound no containerField or field name
> found for the X3D JSON object. Check spelling of node.
>
> >
>
> >    $elementName=Extrusion, DEF=extrusion, $parentName=Shape
>
>
>
>
>
> expected value for parent-child relationship is containerField='geometry'
>
>
>
>
>
> >    Please report this error to x3d-public at web3d.org - thanks for your
> help improving X3D Quality Assurance (QA).
>
> >
>
> > Error: IllegalChildNodeFieldNameNotFound no containerField or field name
> found for the X3D JSON object. Check spelling of node.
>
> >
>
> >    $elementName=Appearance, $parentName=Shape
>
>
>
> expected value for parent-child relationship is containerField='appearance'
>
>
>
> >    Please report this error to x3d-public at web3d.org - thanks for your
> help improving X3D Quality Assurance (QA).
>
> >
>
> > Error: IllegalChildNodeFieldNameNotFound no containerField or field name
> found for the X3D JSON object. Check spelling of node.
>
> >
>
> >    $elementName=Material, $parentName=Appearance
>
>
>
> expected value for parent-child relationship is containerField='material'
>
>
>
> >    Please report this error to x3d-public at web3d.org - thanks for your
> help improving X3D Quality Assurance (QA).
>
> >
>
> > Error: IllegalChildNodeFieldNameNotFound no containerField or field name
> found for the X3D JSON object. Check spelling of node.
>
> >
>
> >    $elementName=TimeSensor, DEF=TourTime, $parentName=Group
>
>
>
> expected value for parent-child relationship is containerField='children'
>
>
>
> >    Please report this error to x3d-public at web3d.org - thanks for your
> help improving X3D Quality Assurance (QA).
>
> >
>
> > Error: IllegalChildNodeFieldNameNotFound no containerField or field name
> found for the X3D JSON object. Check spelling of node.
>
> >
>
> >    $elementName=Script, DEF=MoveCylinder, $parentName=Group
>
>
>
> expected value for parent-child relationship is containerField='children'
>
>
>
> >    Please report this error to x3d-public at web3d.org - thanks for your
> help improving X3D Quality Assurance (QA).
>
> >
>
> > Script DEF=MoveCylinder contains CDATA source-code text, copied as
> "#sourceText" using "strings" mode
>
> >
>
> > So either X3dToJson.xslt is not ready for primetime, or it’s Saxon-JS 2.
>
> >
>
> > Here are some of the output files:
>
> >
>
> > $ grep -l IllegalChild *json2
>
> >
>
> > abox.json2
>
> >
>
> > app.json2
>
> >
>
> > arc.json2
>
> >
>
> > arc1.json2
>
> >
>
> > arc2.json2
>
> >
>
> > arc3.json2
>
> >
>
> > arc4.json2
>
> >
>
> > ArchHalf.json2
>
> >
>
> > ArchPrototype.json2
>
> >
>
> > arcold.json2
>
> >
>
> > asmallbox.json2
>
> >
>
> > ball.json2
>
> >
>
> > BoxEm.json2
>
> >
>
> > BoxManAnimationPanel.json2
>
> >
>
> > bubble.json2
>
> >
>
> > bubbles.json2
>
> >
>
> > bubs.json2
>
> >
>
> > bubs2.json2
>
> >
>
> > bubs3.json2
>
> >
>
> > CameraShape.json2
>
> >
>
> > CoordinateAxes.json2
>
> >
>
> > cube.json2
>
> >
>
> > extrusion.json2
>
> >
>
> > ExtrusionHeart.json2
>
> >
>
> > F16.json2
>
> >
>
> > flipp.json2
>
> >
>
> > flower.json2
>
> >
>
> > flower3.json2
>
> >
>
> > flowerproto.json2
>
> >
>
> > flowers.json2
>
> >
>
> > flowers2.json2
>
> >
>
> > flowers4.json2
>
> >
>
> > force.json2
>
> >
>
> > [snip]
>
> >
>
> > What I will do next is investigate X3dToJson.xslt
>
> >
>
> > Ttiab.
>
> >
>
> > John
>
>
>
> Wondering if your scenes have DOCTYPE (DTD) declarations in them? Is it
> correct?
>
>
>
> * X3D Scene Authoring Hints, Validation of X3D Scenes using DTD and XML
> Schema
>
>
> https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Validation
>
>
>
> I think that the retrieved DOCTYPE is where saxon gets default
> containerField values from in the X3D Examples build.
>
>
>
> If you (or other authors) don't want to include DOCTYPE, that is
> understandable (and of course allowed).  If this is the cause of the
> problem, then maybe we need to add containerField default values directly
> in this stylesheet (as well as a number of others).  Or maybe you want to
> add a local reference to DOCTYPE as part of your invocation.
>
>
>
> all the best, Don
>
> --
>
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
>
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
>
> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210111/b532e5c6/attachment-0001.html>


More information about the x3d-public mailing list