[x3d-public] More Object Model Work: indicating nodes and statements for each profile within object model and X3DJSAIL
Don Brutzman
brutzman at nps.edu
Wed Aug 30 09:46:55 PDT 2017
OK, have amended X3D XML Schema to include allowed nodes under each profile. Also added allowed X3D statements under Core profile.
Documentation at
http://www.web3d.org/specifications/X3dSchemaDocumentation3.3/x3d-3.3_profileNames.html#LinkDC
Next: have extracted these node and statement lists for inclusion in the X3D Unified Object Model profile information.
Result excerpt follows. Please look at syntax, hope it looks OK. As this gets integrated, will next apply by generating profile-validation tests in source code for X3DJSAIL.
<SimpleType name="profileNames"
baseType="SFString"
appinfo="profileName enumeration constants are used to identify the profile for each scene-graph node, and also utilized by X3D element to identify the profile of a contained Scene."
documentation="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#Profiles">
<enumeration value="Core"
appinfo="Core Profile includes no nodes and is provided as the basis for custom componentization. Allowed X3D statements for all profiles are: connect ExternProtoDeclare EXPORT field fieldValue IMPORT IS ProtoBody ProtoDeclare ProtoInterface ProtoInstance ROUTE X3D. Allowed X3D nodes for this profile are: MetadataBoolean MetadataDouble MetadataFloat MetadataInteger MetadataSet MetadataString.">
<allowedElement>MetadataBoolean</allowedElement>
<allowedElement>MetadataDouble</allowedElement>
<allowedElement>MetadataFloat</allowedElement>
<allowedElement>MetadataInteger</allowedElement>
<allowedElement>MetadataSet</allowedElement>
<allowedElement>MetadataString</allowedElement>
<allowedElement>connect</allowedElement>
<allowedElement>ExternProtoDeclare</allowedElement>
<allowedElement>EXPORT</allowedElement>
<allowedElement>field</allowedElement>
<allowedElement>fieldValue</allowedElement>
<allowedElement>IMPORT</allowedElement>
<allowedElement>IS</allowedElement>
<allowedElement>ProtoBody</allowedElement>
<allowedElement>ProtoDeclare</allowedElement>
<allowedElement>ProtoInterface</allowedElement>
<allowedElement>ProtoInstance</allowedElement>
<allowedElement>ROUTE</allowedElement>
<allowedElement>X3D</allowedElement>
</enumeration>
<enumeration value="Interchange"
appinfo="Interchange Profile equals the minimum subset of nodes needed to display lightweight compelling content. Allowed X3D nodes for this profile are: Appearance Background Box Color ColorInterpolator ColorRGBA Cone Coordinate CoordinateInterpolator Cylinder DirectionalLight Group ImageTexture IndexedFaceSet IndexedLineSet IndexedTriangleFanSet IndexedTriangleSet IndexedTriangleStripSet LineSet Material MetadataBoolean MetadataDouble MetadataFloat MetadataInteger MetadataSet MetadataString MultiTexture MultiTextureCoordinate MultiTextureTransform NavigationInfo Normal NormalInterpolator OrientationInterpolator PixelTexture PointSet PositionInterpolator ScalarInterpolator Shape Sphere TextureCoordinate TextureCoordinateGenerator TextureTransform TimeSensor Transform TriangleFanSet TriangleSet TriangleStripSet Viewpoint WorldInfo.">
<allowedElement>Appearance</allowedElement>
<allowedElement>Background</allowedElement>
<allowedElement>Box</allowedElement>
<allowedElement>Color</allowedElement>
<allowedElement>ColorInterpolator</allowedElement>
<allowedElement>ColorRGBA</allowedElement>
<allowedElement>Cone</allowedElement>
<allowedElement>Coordinate</allowedElement>
<allowedElement>CoordinateInterpolator</allowedElement>
<allowedElement>Cylinder</allowedElement>
<allowedElement>DirectionalLight</allowedElement>
<allowedElement>Group</allowedElement>
<allowedElement>ImageTexture</allowedElement>
<allowedElement>IndexedFaceSet</allowedElement>
<allowedElement>IndexedLineSet</allowedElement>
<allowedElement>IndexedTriangleFanSet</allowedElement>
<allowedElement>IndexedTriangleSet</allowedElement>
<allowedElement>IndexedTriangleStripSet</allowedElement>
<allowedElement>LineSet</allowedElement>
<allowedElement>Material</allowedElement>
<allowedElement>MetadataBoolean</allowedElement>
<allowedElement>MetadataDouble</allowedElement>
<allowedElement>MetadataFloat</allowedElement>
<allowedElement>MetadataInteger</allowedElement>
<allowedElement>MetadataSet</allowedElement>
<allowedElement>MetadataString</allowedElement>
<allowedElement>MultiTexture</allowedElement>
<allowedElement>MultiTextureCoordinate</allowedElement>
<allowedElement>MultiTextureTransform</allowedElement>
<allowedElement>NavigationInfo</allowedElement>
<allowedElement>Normal</allowedElement>
<allowedElement>NormalInterpolator</allowedElement>
<allowedElement>OrientationInterpolator</allowedElement>
<allowedElement>PixelTexture</allowedElement>
<allowedElement>PointSet</allowedElement>
<allowedElement>PositionInterpolator</allowedElement>
<allowedElement>ScalarInterpolator</allowedElement>
<allowedElement>Shape</allowedElement>
<allowedElement>Sphere</allowedElement>
<allowedElement>TextureCoordinate</allowedElement>
<allowedElement>TextureCoordinateGenerator</allowedElement>
<allowedElement>TextureTransform</allowedElement>
<allowedElement>TimeSensor</allowedElement>
<allowedElement>Transform</allowedElement>
<allowedElement>TriangleFanSet</allowedElement>
<allowedElement>TriangleSet</allowedElement>
<allowedElement>TriangleStripSet</allowedElement>
<allowedElement>Viewpoint</allowedElement>
<allowedElement>WorldInfo</allowedElement>
<allowedElement>connect</allowedElement>
<allowedElement>ExternProtoDeclare</allowedElement>
<allowedElement>EXPORT</allowedElement>
<allowedElement>field</allowedElement>
<allowedElement>fieldValue</allowedElement>
<allowedElement>IMPORT</allowedElement>
<allowedElement>IS</allowedElement>
<allowedElement>ProtoBody</allowedElement>
<allowedElement>ProtoDeclare</allowedElement>
<allowedElement>ProtoInterface</allowedElement>
<allowedElement>ProtoInstance</allowedElement>
<allowedElement>ROUTE</allowedElement>
<allowedElement>X3D</allowedElement>
</enumeration>
etc.
On 8/23/2017 11:53 AM, Don Brutzman wrote:
> On 8/22/2017 9:30 PM, John Carlson wrote:
>> I would like to validate the contents of a JSON document against the profile without translating to XML. Thus profile to components or profile to node information is required, but may be derived from what you suggest when it will appear in the object model.
>>
>> Please plan to provide this in the object model. I believe it exists somewhat in the XML schema.
>
> First try.
>
> The existing information in X3D XML Schema follows.
>
> http://www.web3d.org/specifications/x3d-3.3.xsd
>
> <xs:simpleType name="profileNames">
> <xs:annotation>
> <xs:appinfo>profileName enumeration constants are used to identify the profile for each scene-graph node, and also utilized by X3D element to identify the profile of a contained Scene.</xs:appinfo>
> <xs:documentation source="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#Profiles"/>
> </xs:annotation>
> <xs:restriction base="xs:string">
> <xs:enumeration value="Core">
> <xs:annotation>
> <xs:appinfo>Core Profile includes no nodes and is provided as the basis for custom componentization.</xs:appinfo>
> <xs:documentation source="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/coreprofile.html"/>
> </xs:annotation>
> </xs:enumeration>
> <xs:enumeration value="Interchange">
> <xs:annotation>
> <xs:appinfo>Interchange Profile equals the minimum subset of nodes needed to display lightweight compelling content.</xs:appinfo>
> <xs:documentation source="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/interchange.html"/>
> </xs:annotation>
> </xs:enumeration>
> <xs:enumeration value="CADInterchange">
> <xs:annotation>
> <xs:appinfo>CADInterchange Profile adds support for CADGeometry component nodes to Interchange Profile.</xs:appinfo>
> <xs:documentation source="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/CADInterchange.html"/>
> </xs:annotation>
> </xs:enumeration>
> <xs:enumeration value="Interactive">
> <xs:annotation>
> <xs:appinfo>Interactive Profile adds interaction nodes (Anchor, KeySensor) to the minimum subset of nodes needed to display lightweight compelling content.</xs:appinfo>
> <xs:documentation source="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/interactive.html"/>
> </xs:annotation>
> </xs:enumeration>
> <xs:enumeration value="Immersive">
> <xs:annotation>
> <xs:appinfo>Immersive Profile equals all of the nodes in the VRML 97 Specification, plus various X3D node additions including KeySensor, StringSensor and Scene.</xs:appinfo>
> <xs:documentation source="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/immersive.html"/>
> </xs:annotation>
> </xs:enumeration>
> <xs:enumeration value="MedicalInterchange">
> <xs:annotation>
> <xs:appinfo>The MedicalInterchange profile adds support for VolumeRendering component to Interchange profile.</xs:appinfo>
> <xs:documentation source="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/MedInterchange.html"/>
> </xs:annotation>
> </xs:enumeration>
> <xs:enumeration value="MPEG4Interactive">
> <xs:annotation>
> <xs:appinfo>MPEGInteractive Profile defines base interoperability with MPEG4 standards to a small subset of nodes needed to display lightweight compelling content.</xs:appinfo>
> <xs:documentation source="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/MPEG4interactive.html"/>
> </xs:annotation>
> </xs:enumeration>
> <xs:enumeration value="Full">
> <xs:annotation>
> <xs:appinfo>The Full Profile corresponds to all Immersive X3D nodes plus all approved/implemented extensions. Full may get renamed Integrated.</xs:appinfo>
> <xs:documentation source="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/fullProfile.html"/>
> </xs:annotation>
> </xs:enumeration>
> </xs:restriction>
> </xs:simpleType>
>
> Note that we are not producing a tagset but rather providing documentation. Also note that if this information in the following data structure, it would have to be part of the corresponding appinfo entries, since no other xs: elements are allowed inside the <xs:enumeration> definitions.
>
> Currently the corresponding object model has
>
> http://www.web3d.org/specifications/X3DObjectModel-3.3.xml
>
> <SimpleType name="profileNames"
> baseType="SFString"
> appinfo="profileName enumeration constants are used to identify the profile for each scene-graph node, and also utilized by X3D element to identify the profile of a contained Scene."
> documentation="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#Profiles">
> <enumeration value="Core"
> appinfo="Core Profile includes no nodes and is provided as the basis for custom componentization."/>
> <enumeration value="Interchange"
> appinfo="Interchange Profile equals the minimum subset of nodes needed to display lightweight compelling content."/>
> <enumeration value="CADInterchange"
> appinfo="CADInterchange Profile adds support for CADGeometry component nodes to Interchange Profile."/>
> <enumeration value="Interactive"
> appinfo="Interactive Profile adds interaction nodes (Anchor, KeySensor) to the minimum subset of nodes needed to display lightweight compelling content."/>
> <enumeration value="Immersive"
> appinfo="Immersive Profile equals all of the nodes in the VRML 97 Specification, plus various X3D node additions including KeySensor, StringSensor and Scene."/>
> <enumeration value="MedicalInterchange"
> appinfo="The MedicalInterchange profile adds support for VolumeRendering component to Interchange profile."/>
> <enumeration value="MPEG4Interactive"
> appinfo="MPEGInteractive Profile defines base interoperability with MPEG4 standards to a small subset of nodes needed to display lightweight compelling content."/>
> <enumeration value="Full"
> appinfo="The Full Profile corresponds to all Immersive X3D nodes plus all approved/implemented extensions. Full may get renamed Integrated."/>
> </SimpleType>
>
>
> Not very structured but reasonably parsable might be something added manually to the schema like:
>
> <xs:appinfo>
> Immersive Profile equals all of the nodes in the VRML 97 Specification, plus various X3D node additions including KeySensor, StringSensor and Scene.
> *Allowed nodes include AnchorAppearanceAudioClip etc.*
> </xs:appinfo>
>
> The corresponding construct in the unified object model (which itself has a modifiable schema of our own design) might then become
>
> <enumeration value="Immersive" appinfo="Immersive Profile equals all of the nodes in the VRML 97 Specification, plus various X3D node additions including KeySensor, StringSensor and Scene.">
> <value>Anchor</value>
> <value>Appearance</value>
> <value>AudioClip</value>
> <value>...</value>
> <enumeration>
>
>
> all the best, Don
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