[x3d-public] X3dToJson.xslt still removing spaces from comments. See this output from Java compared to JavaScript and JavaScript output

John Carlson yottzumm at gmail.com
Tue Jan 23 11:30:15 PST 2018


You can search for "marks: He" (one space) and "marks:  He" (two spaces) in
java/examples/* to derive where the problem lies.

On Jan 21, 2018 1:29 AM, "John Carlson" <yottzumm at gmail.com> wrote:

See subject.  Excess spaces are being removed from comments in JSON output
from X3DJSAIL.



$ diff HelloWorldProgramOutput.Nashorn.x3d HelloWorldProgramOutput.
Nashorn.js.new.x3d

73c73

<                     <!-- Comment example A, plain quotation marks:  He
said, "Immel did it!" -->

---

>                     <!-- Comment example A, plain quotation marks: He
said, "Immel did it!" -->

112a113

>

230a232

>

248,252c250

<         <!-- Test success:
x3dModel.findNodeByDEF(DeclarativeAppearanceExample)
= <Appearance DEF='DeclarativeAppearanceExample'/> i.e.

< <Appearance DEF='DeclarativeAppearanceExample'>

<     <!- - DeclarativeMaterialExample gets overridden by subsequently
added MaterialModulator ProtoInstance - ->

<     <ProtoInstance DEF='MyMaterialModulator' name='MaterialModulator'
containerField='material'/>

< </Appearance> -->

---

>         <!-- Test success: x3dModel.findNodeByDEF(DeclarativeAppearanceExample)
= <Appearance DEF='DeclarativeAppearanceExample'/> i.e. <Appearance
DEF='DeclarativeAppearanceExample'>
<!- - DeclarativeMaterialExample gets overridden by subsequently added
MaterialModulator ProtoInstance - -> <ProtoInstance
DEF='MyMaterialModulator' name='MaterialModulator'
containerField='material'/> </Appearance> -->

255c253

<         <!-- Test success:
x3dModel.findElementByNameValue("MaterialModulator",
"ProtoDeclare")  found -->

---

>         <!-- Test success: x3dModel.findElementByNameValue("MaterialModulator",
"ProtoDeclare") found -->

279,284c277,282

<         <!-- Test success:  AnchorObject.isNode()=true,
siteAnchor.isNode()=true -->

<         <!-- Test success:  AnchorObject.isStatement()=false,
siteAnchor.isStatement()=false -->

<         <!-- Test success:   ROUTEObject.isNode()=false,
orbitPositionROUTE.isNode()=false -->

<         <!-- Test success:   ROUTEObject.isStatement()=true,
orbitPositionROUTE.isStatement()=true -->

<         <!-- Test success: CommentsBlock.isNode()=false,
testComments.isNode()=false -->

<         <!-- Test failure: CommentsBlock.isStatement()=true,
testComments.isStatement()=true -->

---

>         <!-- Test success: AnchorObject.isNode()=true,
siteAnchor.isNode()=true -->

>         <!-- Test success: AnchorObject.isStatement()=false,
siteAnchor.isStatement()=false -->

>         <!-- Test success: ROUTEObject.isNode()=false,
orbitPositionROUTE.isNode()=false -->

>         <!-- Test success: ROUTEObject.isStatement()=true,
orbitPositionROUTE.isStatement()=true -->

>         <!-- Test success: CommentsBlock.isNode()=false,
testComments.isNode()=false -->

>         <!-- Test failure: CommentsBlock.isStatement()=true,
testComments.isStatement()=true -->
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180123/c69feb4e/attachment.html>


More information about the x3d-public mailing list