[x3d-public] Don, Vince, action item on data file, x3d/content/examples/Basic/Points/BasicPointSprites.json X3dToJson.xslt
John Carlson
yottzumm at gmail.com
Tue Apr 27 01:34:26 PDT 2021
I did all this work, and it appears the file is under development. I
should have checked that first.
Please ignore or update the X3D XML file (get rid of warning).
x3d/content/examples/Basic/Points/BasicPointSprites.x3d
=========================================================================================================================
Vince, action item for you. Thanks!
Don, can you check in X3dToJson.xslt if Vince is busy. I'm not seeing
anything obvious.
This seems to be the error that's causing the most problems:
keyword: type
dataPath: X3D > Scene > -children > 1 > Transform > -children > 2 >
Shape > -appearance > Appearance > -pointProperties
value: ["|omitted|"]
message: should be object
params: {"type":"object"}
file:
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/Points/BasicPointSprites.json
version: 4.0
What I think is, that the JSON schema generator is treating
pointProperties (and PointProperies) as an object (SFNode) and not an
array, as produced by X3dToJson.xslt
This will require some investigation.
Vince, can you look a bit into this? I'll attach the X3D JSON #2 and X3D
XML files.
The committee draft,
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD/ of
X3DV4 shows pointProperties is an SFNode, so I'm not quite sure how
X3dToJson.xslt is producing an array.
Here's a snippet of X3DUOM:
<field name="pointProperties"
type="SFNode"
accessType="inputOutput"
default="NULL"
acceptableNodeTypes="PointProperties">
<componentInfo name="Shape" level="5"/>
</field>
What I will do next is translate with my XML to JSON. Here's what the
JSON code looks like for pointProperties:
"Appearance": {
"@DEF": "PointProperties1",
"-pointProperties": {
"PointProperties": {
"@attenuation": [
1,
0.01,
0.1
],
"@pointSizeMaxValue": 1,
"@pointSizeMinValue": 5,
"@pointSizeScaleFactor": 100
}
},
"-children": [
{
"#comment": " X3Dv3.3 ImageTexture has no
effect on points, X3Dv4.0 each point is replaced by an image sprite "
},
{
"ImageTexture": {
"@url": [
"images/sphere.png",
"https://www.web3d.org/x3d/content/examples/Basic/Points/images/sphere.png"
]
}
}
Even using my DOM2JSON serializer, there are errors:
$ node x3dvalidate.js BasicPointSprites.json
Loading schema
Parsing schema
Adding schema
Schema 4.0 added
Schema 4.0 compiled
================================================================================
File: BasicPointSprites.json
Error reading BasicPointSprites.json
keyword: additionalProperties
dataPath: X3D > Scene > -children > 1 > Transform
value: {"@translation":"|omitted|","-children":"|omitted|"}
message: should not have additional properties
params: {"additionalProperty":"@translation"}
file: BasicPointSprites.json
version: 4.0
keyword: required
dataPath: X3D > Scene > -children > 1 > Transform > -children > 2 > Shape
value: {"-children":"|omitted|"}
message: should have required property @USE
params: {"missingProperty":"@USE"}
file: BasicPointSprites.json
version: 4.0
keyword: additionalProperties
dataPath: X3D > Scene > -children > 1 > Transform > -children > 2 >
Shape > -children > 0
value: {"PointSet":"|omitted|"}
message: should not have additional properties
params: {"additionalProperty":"PointSet"}
file: BasicPointSprites.json
version: 4.0
keyword: oneOf
dataPath: X3D > Scene > -children > 1 > Transform > -children > 2 > Shape
value: {"-children":"|omitted|"}
message: should match exactly one schema in "oneOf"
params: {"passingSchemas":null}
file: BasicPointSprites.json
version: 4.0
keyword: oneOf
dataPath: X3D > Scene > -children > 1 > Transform
value: {"@translation":"|omitted|","-children":"|omitted|"}
message: should match exactly one schema in "oneOf"
params: {"passingSchemas":null}
file: BasicPointSprites.json
version: 4.0
Attaching that JSON as well, #1, but having -children under Shape is
kind of weird. I'll try to investigate. If I haven't reported for a
while on this, Please let me know, under the title X3DJSONLD
DOM2JSONSerializer. I am also seeing that -appearance it not appearing
in DOM2JSON. Yipes! Maybe I'll deprecate my versions, and keep pushing
Don for an X3dToJson.xslt that works with xslt3 ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BasicPointSprites.x3d
Type: model/x3d+xml
Size: 11687 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210427/f94c7709/attachment-0001.x3d>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BasicPointSprites1.json
Type: application/json
Size: 56052 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210427/f94c7709/attachment-0002.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BasicPointSprites2.json
Type: application/json
Size: 15379 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210427/f94c7709/attachment-0003.json>
More information about the x3d-public
mailing list