Menu ▾ ▴

#130 X3dToJson.xslt: LayoutLayer.-viewport is an object, SFNode, not an array, MFNode

X3D4
open
None
2026-10-29
2026-10-26
No

See attached files that have issue.
https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/layout.html#LayoutLayer

X3dToJson.xslt treats -viewport as an MFNode, not an SFNode.

36.4.3 LayoutLayer
LayoutLayer : X3DLayerNode {
MFNode [in] addChildren [X3DChildNode]
MFNode [in] removeChildren [X3DChildNode]
MFNode [in,out] children [] [X3DChildNode]
SFNode [in,out] layout NULL [X3DLayoutNode]
SFNode [in,out] metadata NULL [X3DMetadataObject]
MFString [in,out] objectType "ALL" ["ALL","NONE","TERRAIN",...]
SFBool [in,out] pickable TRUE
SFNode [in,out] viewport NULL [X3DViewportNode]*
SFBool [in,out] visible TRUE
}

npx x3dvalidate grep -l viewport ../data/*x3dj| grep -v new
Loading schema
Parsing schema
Adding schema
Schema 4.0 added
Schema 4.0 compiled
================================================================================
File: ../data/bumpyfreewrljsonverse.x3dj
Suppressing @USE missing property. Use --fullreport to reveal possibly confusing errors
Suppressing @USE missing property. Use --fullreport to reveal possibly confusing errors
Suppressing null passingSchemas. Use --fullreport to reveal possibly confusing errors
Suppressing null passingSchemas. Use --fullreport to reveal possibly confusing errors
Error invalid file ../data/bumpyfreewrljsonverse.x3dj
keyword: type
location in document: /X3D/Scene/-children/6/LayerSet/-layers/1/LayoutLayer/-viewport
message: must be object
params: {"type":"object"}
file: ../data/bumpyfreewrljsonverse.x3dj
version: 4.0

================================================================================
File: ../data/bumpyfreewrlsliders.x3dj
Suppressing @USE missing property. Use --fullreport to reveal possibly confusing errors
Suppressing @USE missing property. Use --fullreport to reveal possibly confusing errors
Suppressing null passingSchemas. Use --fullreport to reveal possibly confusing errors
Suppressing null passingSchemas. Use --fullreport to reveal possibly confusing errors
Error invalid file ../data/bumpyfreewrlsliders.x3dj
keyword: type
location in document: /X3D/Scene/-children/1/LayerSet/-layers/1/LayoutLayer/-viewport
message: must be object
params: {"type":"object"}
file: ../data/bumpyfreewrlsliders.x3dj
version: 4.0

================================================================================
File: ../data/bumpyx_itesliders.x3dj
Suppressing @USE missing property. Use --fullreport to reveal possibly confusing errors
Suppressing @USE missing property. Use --fullreport to reveal possibly confusing errors
Suppressing null passingSchemas. Use --fullreport to reveal possibly confusing errors
Suppressing null passingSchemas. Use --fullreport to reveal possibly confusing errors
Error invalid file ../data/bumpyx_itesliders.x3dj
keyword: type
location in document: /X3D/Scene/-children/1/LayerSet/-layers/1/LayoutLayer/-viewport
message: must be object
params: {"type":"object"}
file: ../data/bumpyx_itesliders.x3dj
version: 4.0

================================================================================
File: ../data/sliders.x3dj
Suppressing @USE missing property. Use --fullreport to reveal possibly confusing errors
Suppressing @USE missing property. Use --fullreport to reveal possibly confusing errors
Suppressing null passingSchemas. Use --fullreport to reveal possibly confusing errors
Suppressing null passingSchemas. Use --fullreport to reveal possibly confusing errors
Error invalid file ../data/sliders.x3dj
keyword: type
location in document: /X3D/Scene/-children/0/LayerSet/-layers/1/LayoutLayer/-viewport
message: must be object
params: {"type":"object"}
file: ../data/sliders.x3dj
version: 4.0

yottzumm@yottzumm-MacBookAir:~/X3DJSONLD/src/main/python$

3 Attachments

Discussion

  • John W Carlson

    John W Carlson - 2026-10-26

    One more attachment sample

     
  • John W Carlson

    John W Carlson - 2026-10-26

    XML Source

     
  • Don Brutzman

    Don Brutzman - 2026-10-29

    First of all, without change in issue correctness, the proper specification link for X3D v4.1 draft is

    I've added the following test for SFNode when X3dToJson.xslt (and a half-dozen other stylesheets) when computing node type.

                    (starts-with($parentElementName,'Layout')    and  $attributeName='viewport') or
    

    Now checked in. Please test.

     
  • John W Carlson

    John W Carlson - 2026-10-29

    No evidence of improvement. See JSON screenshot, dates on file, and diff. What I didn't show was the conversion, but there's no evidence of any change to the data folder with git diff.

     

Log in to post a comment.