[x3d-public] JSON encoding for SFNode: no [array brackets]

Don Brutzman brutzman at nps.edu
Fri Feb 19 08:51:43 PST 2016


As you suspected, the .x3d is not passing QA tests for XML validation because no DOCTYPE or schema is linked.  Once that is done, further flaws may be found.


--------- Commence validation checks for x3dconnector.x3d ---------

Performing well-formed XML check...
Checking file:/C:/Users/don/Desktop/X3D/test/x3dconnector.x3d...
Well-formed XML check: pass

Performing DOCTYPE check...
[X3dDoctypeChecker] success: valid XML declaration found;
[Error] failure: no X3D DOCTYPE found!
<?xml version="1.0" encoding="UTF-8"?>

Performing DTD validation...
Checking file:/C:/Users/don/Desktop/X3D/test/x3dconnector.x3d...
Document is invalid: no grammar found.
Document root element "X3D", must match DOCTYPE root "null".
XML DTD validation: fail!

Performing X3D schema validation...
Checking file:/C:/Users/don/Desktop/X3D/test/x3dconnector.x3d...
cvc-elt.1: Cannot find the declaration of element 'X3D'.
XML schema validation: fail!

Performing X3D regular expression (regex) values check...

Performing X3dToClassicVrml.xslt conversion check...

Performing X3D Schematron check...
<X3D profile=''> doesn't match contained nodes, increase profile or add needed <X3D><head><component> statements [/X3D, error]
<X3D profile=''> has unrecognized value, actual profile='Immersive' [/X3D, info]
X3D root element must include version number. [/X3D, error]
X3D version must be 3.0, 3.1, 3.2, 3.3 or 4.0 [/X3D, error]
<Viewpoint DEF=''/> is missing description, which is needed for usability.  Example: description='default view, rotate to examine object' [/X3D/Scene/Viewpoint, warning]
<Viewpoint DEF=''/> requires at least <component name='Navigation' level='1'/> or <X3D profile='Interchange'/> [/X3D/Scene/Viewpoint, error]
<PlaneSensor DEF='PS1'/> is missing description. Example: description='touch to activate' [/X3D/Scene/Transform[1]/PlaneSensor, warning]
<PlaneSensor DEF='PS2'/> is missing description. Example: description='touch to activate' [/X3D/Scene/Transform[2]/PlaneSensor, warning]
<Script DEF='S1'/> requires at least <component name='Scripting' level='1'/> or <X3D profile='Immersive'/> [/X3D/Scene/Script, error]

--------- Validation checks complete for x3dconnector.x3d ---------



--------- Commence validation checks for x3dconnectorProto.x3d ---------

Performing well-formed XML check...
Checking file:/C:/Users/don/Desktop/X3D/test/x3dconnectorProto.x3d...
Well-formed XML check: pass

Performing DOCTYPE check...
[X3dDoctypeChecker] success: valid XML declaration found;
[Error] failure: no X3D DOCTYPE found!
<?xml version="1.0" encoding="UTF-8"?>

Performing DTD validation...
Checking file:/C:/Users/don/Desktop/X3D/test/x3dconnectorProto.x3d...
Document is invalid: no grammar found.
Document root element "X3D", must match DOCTYPE root "null".
XML DTD validation: fail!

Performing X3D schema validation...
Checking file:/C:/Users/don/Desktop/X3D/test/x3dconnectorProto.x3d...
cvc-elt.1: Cannot find the declaration of element 'X3D'.
XML schema validation: fail!

Performing X3D regular expression (regex) values check...

Performing X3dToClassicVrml.xslt conversion check...

Performing X3D Schematron check...
<X3D profile=''> doesn't match contained nodes, increase profile or add needed <X3D><head><component> statements [/X3D, error]
<X3D profile=''> has unrecognized value, actual profile='Immersive' [/X3D, info]
X3D root element must include version number. [/X3D, error]
X3D version must be 3.0, 3.1, 3.2, 3.3 or 4.0 [/X3D, error]
<Viewpoint DEF=''/> is missing description, which is needed for usability.  Example: description='default view, rotate to examine object' [/X3D/Scene/Viewpoint, warning]
<Viewpoint DEF=''/> requires at least <component name='Navigation' level='1'/> or <X3D profile='Interchange'/> [/X3D/Scene/Viewpoint, error]
<PlaneSensor DEF='PS1'/> is missing description. Example: description='touch to activate' [/X3D/Scene/Transform[1]/PlaneSensor, warning]
<PlaneSensor DEF='PS2'/> is missing description. Example: description='touch to activate' [/X3D/Scene/Transform[2]/PlaneSensor, warning]
<PlaneSensor DEF='PS3'/> is missing description. Example: description='touch to activate' [/X3D/Scene/Transform[3]/PlaneSensor, warning]
<PlaneSensor DEF='PS4'/> is missing description. Example: description='touch to activate' [/X3D/Scene/Transform[4]/PlaneSensor, warning]
<ProtoDeclare DEF=''/> requires at least <component name='Core' level='2'/> or <X3D profile='Immersive'/> [/X3D/Scene/ProtoDeclare, error]
<Script DEF='S1'/> requires at least <component name='Scripting' level='1'/> or <X3D profile='Immersive'/> [/X3D/Scene/ProtoDeclare/ProtoBody/Script, error]
<ProtoInstance DEF='connector1'/> requires at least <component name='Core' level='2'/> or <X3D profile='Immersive'/> [/X3D/Scene/ProtoInstance[1], error]

--------- Validation checks complete for x3dconnectorProto.x3d ---------

I used X3D-Edit to insert the following:

<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>

Now passes more cleanly, only reporting warnings about missing description fields.

Gotta go, converting updates to JSON with our latest changes can be later.

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



More information about the x3d-public mailing list