Schema for the Extensible 3D (X3D) tagset, representing the draft Virtual Reality Modeling Language (VRML) 200x. ============================================================================= Revised: 7 May 2001 Author: Don Brutzman Acknowledgements: - Rick Goldberg of the Sun Java3D team wrote the first two versions of the SAI using IDL and provided invaluable help on the schema SAI. - Joe Williams of HyperMultiMedia documented and further developed the scene graph interface hierarchy, making this schema possible. - Thanks for additional insights and assistance from Len Bullard, Justin Couch, Bryan Housel, Alan Hudson, Chris Lilley, Nick Polys, Dick Puk, C.M. Sperberg-McQueen and Joe Williams. Design summary: - Schemas define XML tagsets in depth using a native-XML format. - Schemas are an alternative to Document Type Definitions (DTDs). - This X3D Schema matches the functionality of the X3D DTD and provides significant further capabilities, including strong type checking of both node and attribute values. - An XSLT stylesheet is applied to this schema in order to autogenerate source code for the Scene Authoring Interface (SAI). Design patterns: - VRML base types have clarified names (MFFloat becomes Floats etc.) and are represented by Schema simpleTypes. - List types are used to augment Schema simple types and create arrays of VRML base types (integerList etc) for further use by Schema simpleTypes. - VRML node types (GroupingNodeType etc.) are represented by Schema complexTypes. - VRML node types match the interface hierarchy, capture strong typing of node, relationships, and collect common attributes shared by nodes. These features provide functional consistency between scene graph content and the Scene Authoring Interface (SAI) application programming interface (API). - Simple non-node VRML fields using base types are represented by XML attributes. - VRML nodes implement node types and are represented by XML elements. Version plan: - 0.4 Nodes for Core and BaseLine profiles (20 November 2000) - 0.5 Nodes for DisJavaVrml, GeoVrml, H-Anim, Nurbs, any others in Full profile - 0.6 Autogenerated Scene Authoring Interface (SAI). First show Java interfaces, then show multiple formats including Interface Description Language (IDL) and matching Java classes that implement the Java interfaces - 0.7 Resolution of compromise/compact representations (wrapper tags), and use of DTD internal parameter-entity names updated to match interface hierarchy naming scheme - 0.8 Exemplar content and authoring tools that correspond to X3D Schema tagset - 0.9 Public review and Xj3D open-source implementation version - 1.0 X3D Task Group consensus for inclusion in VRML 200x specification - 1.1 Web3D Consortium endorsement ============================================================================= References: - This schema: http://www.web3D.org/TaskGroups/x3d/translation/X3dSchemaDraft.xml - X3D tagset DTDs: http://www.web3D.org/TaskGroups/x3d/translation/x3d-compromise.dtd http://www.web3D.org/TaskGroups/x3d/translation/x3d-compact.dtd http://www.web3D.org/TaskGroups/x3d/translation/DisJavaVrml.dtd http://www.web3D.org/TaskGroups/x3d/translation/GeoVrml.dtd http://www.web3D.org/TaskGroups/x3d/translation/H-Anim.dtd http://www.web3D.org/TaskGroups/x3d/translation/Nurbs.dtd - Interface hierarchy: http://www.hypermultimedia.com/Xj3D/x3d_candidate_fig.txt - X3D Scene Authoring Interface (SAI): http://www.web3D.org/TaskGroups/x3d/translation/sai/SceneAuthoringInterface.html - Wrapper tag issues: http://www.web3D.org/TaskGroups/x3d/ComposingSceneGraphAlternatives.html - Related VRML specs: http://www.web3D.org/technicalinfo/specifications/vrml97/index.htm http://web3D.org/TaskGroups/vrtp/dis-java-vrml http://www.geovrml.org/1.0 http://h-anim.org/spec1.1 http://www.blaxxun.com/support/developerguide/developer/contact/3d/nurbs/spec/nurbsproposal.html - Schema DTD: http://www.w3.org/2000/10/XMLSchema.dtd - Schema schema: http://www.w3.org/2000/10/XMLSchema.xsd - Datatypes DTD: http://www.w3.org/2000/10/datatypes.dtd - Datatypes schema: http://www.w3.org/2000/10/datatypes.xsd - Schema Primer: http://www.w3.org/TR/2000/WD-xmlschema-0-20000922 - Schema Structures: http://www.w3.org/TR/2000/WD-xmlschema-1-20000922 - Schema Datatypes: http://www.w3.org/TR/2000/WD-xmlschema-2-20000922 - Schema group: http://www.w3.org/XML/Schema - Schema validator: http://www.w3.org/2000/09/webdata/xsv - Robin Cover's pages: http://www.oasis-open.org/cover/schemas.html - Best practices: http://www.xfront.com/BestPractices.html - Xeena XML editor: http://www.alphaWorks.ibm.com/tech/xeena - Xeena xsd profile: http://www.web3D.org/TaskGroups/x3d/translation/XMLSchema.profile - X3D-Edit: http://www.web3D.org/TaskGroups/x3d/translation/README.X3D-Edit.html - X3D-Schema-Edit: http://www.web3D.org/TaskGroups/x3d/translation/X3D-Schema-Edit.bat - X3D Contributors: http://www.web3D.org/x3d.html W3C XmlSchema.dtd revisions: - None needed. Using original W3C Schema and Datatypes DTDs listed above. ============================================================================= Nodes with different attributes/interfaces/names than VRML 97: - Anchor: implement TouchSensorNodeType (and thus SensorNodeType) interface, add attributes enabled, isActive, isOver, touchTime - Collision: implement EnvironmentalSensorNodeType (and thus SensorNodeType) interface, add attributes enabled, isActive - Color: naming collision between BaseField 'color' and node interface 'Color' resolved by renaming the Color node as ColorNode. - Joint: implement BoundedNodeType interface, attributes bboxCenter, bboxSize - KeySensor: new node - IndexedLineSet: new attribute lineWidth - LOD: children (instead of level), implement BoundedNodeType interface for bboxCenter, bboxSize - PointSet: new attribute pointSize - Scene: integrates functionality of VRML 97 Script node's Browser class - Site: implement BoundedNodeType interface, attributes bboxCenter, bboxSize - StringSensor: new node - Switch: children (instead of choice), might implement BoundedNodeType interface - Viewpoint: new (experimental) attribute examine (rotation used when active NavigationInfo is in EXAMINE mode) - No attributes are designated as eventIn, eventOut, field, exposedField since all are treated equivalently (by design decision at 1999 summit). Prototype fields can indicate fieldHint via attribute vrml97Hint for backwards compatibility using X3D-to-VRML-97 translators. - Routing events via field-name prefix set_ (or suffix _changed) is no longer needed. Ought to be designated as a deprecation so that X3D implementations are forgiving. X3dToVrml97.xsl needs to be updated to support proper backwards translation automatically. ============================================================================= X3D design work completed: - Verify correct profile attributes for all nodes. - Verify all nodes, attributes and relationships using DTD. - Verify node types against latest interface hierarchy. - Verify summary of attribute additions relative to VRML 97 specification. - Verify attribute distribution among node types using SAI version 1. - Resolve BaseNode and base type relationships and naming conventions. - Added StringsUrl type to allow further pattern restrictions on valid url values, with expectation that further detail needs to be specified that is compatible with URNs. StringsUrl maps to VRML 97 MFStrings. - Multiple interfaces for Anchor, Collision, MovieTexture, TimeSensor: have verified there is no native Schema approach available for directly indicating multiple simultaneous types. Thus an otherInterfaces attribute is provided in combination with explicit repetition of attributes for these other interfaces. This allows proper autogeneration of multiple IDL and API interfaces by XSLT stylesheets. - Verify there are no other multiple interface nodes. - Extract tooltips from X3D-Edit to augment annotation->appinfo text. - Ensure setup and configuration files properly documented and available online as part of X3D-Edit distribution. - VRML 97's Script node Browser class (for values exposed to a browser) is being provided via attributes on Scene node (and thus a Scene interface). Also need to update DTD, X3D-Edit tooltips profile and X3dToVrml97.xsl translation stylesheet. - Use attributeGroup for any attributes contained in complexType (meaning NodeType definitions) so that multiple-interface repetitions can refer to the proper attributeGroup rather than explicitly repeating each attribute. - SceneGraphStructureType interface identifies scene-related nodes that are not renderable nodes in the scene graph (X3D, Header, Scene, ROUTE etc.). - Scene Authoring Interface (SAI) Java bindings for interfaces in org/web3d/x3d/core/SceneAuthoringInterface.java are autogenerated from X3dSchemaDraft.xml by BuildInterfacesFromSchema.xsl - Enumeration types originally converted to Java interfaces, now converted into fully functional utility classes. - Can X3D element be formally designated as root node? Apparently not, according to revised Schema recommendation. Nevertheless, structured relationships of the node typing rules makes X3D the root. No further action required. - SceneGraphStructureNodeType nodes (X3D, Scene, Header, Prototype* etc.) changed from Full profile to either BaseLine or Core profile as appropriate. X3D design work in progress: - Update to match March 2001 XML Schema revisions. - Using XSV validator to check the internal consistency of the schema. - Matching interfaces with org.w3c.dom Element, Attr and Event types. Mapping to SAI BaseNode, BaseField and Event respectively. Under evaluation as part of Scene Authoring Interface (SAI) development. - Add additional type restrictions such as FloatNonNegative etc. ? Consider whether this can be codified as further base types or included as range restrictions on existing base types. Challenge is getting FloatNonNegative to map to Float externally while still providing range-checking of attribute values. - Can FloatNonNegative pattern restrictions instead be added on a localized node-by-node basis? Probably too verbose, but at least that preserves base-type definitions. - Can deprecations be encoded as allowable options, or alternate/duplicate attributes? Stylesheets can capture and propagate the deprecations if consistently defined. - Can SubstitutionGroup be used for deprecated node labels like LOD-level (now LOD-children) and Switch-choice (now Switch-children)? - Patterns for multifield types need to be completed. - Establish different namespace scopes for DEF/USE (and ROUTE/IS) inside ProtoDeclare. - Establish different namespace scopes for node and ProtoDeclare names. - Update the x3d-compromise.dtd and x3d-compact.dtd to precisely match the internal names used for node types (e.g. GroupingNode). - Add source urls for annotations appinfo/documentation once specification addresses are stable. Initially using VRML 97 specification URLs for clarity. Updating to XLink urls into VRML 200x is the eventual goal. - Can USE be substituted anywhere? XML Schema substitutionGroup? Wildcard? - Insert namespace prefixes (xsd: etc.) once Xeena editing permits. See next section of this documentation for example implementation details. - How do we allow X3D.profileForContainedScene to contain/return an array of profileName values? Must we create a new type profileNameArray? - Designate optionalAttributes for appropriate fields in Core profile nodes (or else just annotate them and leave it as an implementer choice). - Is it possible for this schema to differentiate profile-optional attributes (e.g. Anchor.target, IndexedFaceSet.convex etc.) in the same way that the DTD allows strict or loose checking of core-profile attributes? This is a bit tricky since browsers can optionally support Baseline-related attributes even when operating in a Core profile mode. - Relax ROUTE to appear within a scene/prototype, not solely at the end. ============================================================================= Future work with namespaces and 'xsd:' qualifiers for non-X3D schema elements/datatypes, once software tools are namespace aware: xmlns ="http://www.w3.org/2000/10/XMLSchema" xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns:x3d="http://www.web3D.org/TaskGroups/x3d/translation/X3dSchemaDraft.dtd" targetNamespace="http://www.web3D.org/TaskGroups/x3d/translation/X3dSchemaDraft.dtd" DTD processing approach to namespaces: X3dSchemaDraft.xml entity declaration section (i.e. document subset) which goes inside the DOCTYPE tag at the top of this schema: [ ] Caution: Xeena and JAXP do not yet support document subset or namespaces, so the preceding document subset fragment listed here will get clobbered if inserted inside DOCTYPE. ============================================================================= integerList is an internal type for creating lists in the schema, not for author use, that may get refactored away in a future version of the X3D schema. doubleList is an internal type for creating lists in the schema, not for author use, that may get refactored away in a future version of the X3D schema. floatList is an internal type for creating lists in the schema, not for author use, that may get refactored away in a future version of the X3D schema. Base is the same as the VRML 97 Field class. BaseField, BaseFieldArray, BaseNode and BaseNodeArray implement Base. BaseField is equivalent to SF (Single Field) simple non-Node types in the VRML 97 Specification. BoundedNodeType indicates that bounding box values can be provided (or computed) for this node and any children. Bounding box values approximate the volume of a containing box in the current coordinate system. Bounding box values can optionally be provided to (or calculated by) 3D browsers. Bounding box values are hints that can improve performance by allowing browsers to inexpensively cull geometry, thus avoiding the computational cost of trying to drawing shapes when they are outside of the current view. BoundingBoxSize dimensions are non-negative values. Default value (-1 -1 -1) indicates that no bounding box size has been computed. StringsUrl is an experimental type to provide better functionality for url values. Boolean is a logical type with possible values (true|false) to match the XML boolean type. Boolean is equivalent to type SFBool (TRUE|FALSE) in the VRML Specification. Hint: X3D boolean values are lower case in order to maintain compatibility with other XML documents. Booleans is an array of Boolean values. Booleans is analagous to type MFBool, unspecified in the VRML 97 Specification. Hint: Booleans is useful for defining a series of behavior states using a BooleanInterpolator node. Color is equivalent to type SFColor in the VRML 97 Specification. Colors is equivalent to type MFColor in the VRML 97 Specification. Double is a double-precision floating-point type. See GeoVRML 1.0 Recommended Practice, Section 2.3, Limitations Of Single-Precision. Double/Doubles are analagous to SFDouble/MFDouble using VRML specification nomenclature. Doubles is an array of Double values, i.e. a double-precision floating-point array type. See GeoVRML 1.0 Recommended Practice, Section 2.3, Limitations Of Single-Precision. Double/Doubles are analagous to SFDouble/MFDouble using VRML specification nomenclature. Float is a single-precision floating-point type. Float is equivalent to type SFFloat in the VRML 97 Specification. Floats is an array of Float values, i.e. a single-precision floating-point array type. Floats is equivalent to type MFFloat in the VRML 97 Specification. Image is equivalent to type SFImage in the VRML 97 Specification. Images is an array of Image values. Images is analagous to MFImage using VRML 97 Specification nomenclature. Hint: Images may become a useful type for multitexture imaging. Integer is equivalent to type SFInt32 in the VRML 97 Specification. Integers is an array of Integer values. Integers is equivalent to type MFInt32 in the VRML 97 Specification. Rotation is an axis-angle 4-tuple indicating X-Y-Z direction plus angle orientation about that axis. Rotation is equivalent to type SFRotation in the VRML 97 Specification. Rotations is an array of Rotation values. Rotations is equivalent to type MFRotation in the VRML 97 Specification. String is equivalent to type SFString in the VRML 97 Specification. Strings is an array of String values. Strings is equivalent to type MFString in the VRML 97 Specification. Time is equivalent to type SFTime in the VRML 97 Specification. Times is an array of Time values. Times is equivalent to type MFTime in the VRML 97 Specification. Vector2Float is a 2-tuple pair of Float values. Vector2Float is equivalent to type SFVec2f in the VRML 97 Specification. Hint: Vector2Float can be used to specify a 2D coordinate. Vector2FloatArray is an array of Vector2Float values. Vector2FloatArray is equivalent to type MFVec2f in the VRML 97 Specification. Vector3Float is a 3-tuple triplet of Float values. Vector3Float is equivalent to type SFVec3f in the VRML 97 Specification. Hint: Vector3Float can be used to specify a 3D coordinate. Vector3FloatArray is an array of Vector3Float values. Vector3FloatArray is equivalent to type MFVec3f in the VRML 97 Specification. Vector3Double is a 3-tuple triplet of Double values. See GeoVRML 1.0 Recommended Practice, Section 2.3, Limitations Of Single-Precision. Hint: Vector3Double can be used to specify a georeferenced 3D coordinate. Vector3DoubleArray is an array of Vector3Double values. See GeoVRML 1.0 Recommended Practice, Section 2.3, Limitations Of Single-Precision. Hint: Vector3DoubleArray can be used to specify a list of georeferenced 3D coordinates. fieldTypeName contains the names of all BaseField types. profileName enumeration constants are used to identify the profile for each scene-graph node, and also used by X3D tag to identify the profile of a contained Scene. BaseLine Profile equals all of the nodes in the VRML 97 Specification, plus VRML 200x node additions including KeySensor, StringSensor and Scene. Warning: the X3D/VRML 200x Specification is still in very rough form and will be modified to match implementation/evaluation results. Core Profile equals the minimum subset of nodes needed to author lightweight compelling content. Warning: the X3D/VRML 200x Specification is still in very rough form and will be modified to match implementation/evaluation results. DisJavaVrml Profile demonstrates how to implement the IEEE Distributed Interactive Simulation (DIS) Protocol with VRML 97/200x for physics-based multi-player distributed virtual environments. The Full Profile corresponds to all BaseLine VRML nodes plus all approved/implemented extensions. Warning: the X3D/VRML 200x Specification is still in very rough form and will be modified to match implementation/evaluation results. GeoVRML 1.0 Recommended Practice for the representation of geographical data in VRML. Humanoid Animation Recommended Practice version 1.1 H-Anim is a standard way of representing humanoids in VRML 97. It allow humanoids created using authoring tools from one vendor to be animated using tools from another. H-Anim humanoids can be animated using keyframing, inverse kinematics, performance animation systems and other techniques. Warning: Lattice Profile not yet implemented. Nurbs are Non-Uniform Rational B-Spline surfaces. Warning: Nurbs Profile is only partially implemented, PrototypeDeclarations are still needed for these nodes. A Nurbs overview is also available http://www.blaxxun.com/developer/contact/3d/nurbs/overview.html fieldHint allows providing backwards compatibility with VRML 97 for Script and Proto field definitions. Nodes of this type can be used as child nodes for Appearance. Nodes implementing AudioClipNodeType are allowed children of MovieTexture BaseFieldArray is equivalent to MF (Multiple Field) simple non-Node types in the VRML 97 Specification. All instantiable nodes implement BaseNode, which corresponds to SFNode in the VRML 97 specification. Default fixed value for profile can be overridden by implementing nodes and node types. BaseNodeArray corresponds to MFNode in the VRML 97 specification. Bindable nodes implement the binding stack, so that only one of each node type is active at a given time. BoundedNodeType indicates that bounding box values can be provided (or computed) for this node and any children. Bounding box values approximate the volume of a containing box in the current coordinate system. Bounding box values can optionally be provided to (or calculated by) 3D browsers. Bounding box values are hints that can improve performance by allowing browsers to inexpensively cull geometry, thus avoiding the computational cost of trying to drawing shapes when they are outside of the current view. A node that implements ChildNodeType is one of the legal children for a GroupingNodeType parent. ContainedNodeLabel tags help distinguish between the different uses of node siblings that might otherwise share the same node type. These tags are labels in the scene graph, not instantiable nodes. Because these tags do not need to be instantiated as scene graph nodes, they do not have DEF or USE values like BaseNodes. ContainedNodeLabel tags are sometimes referred to as "wrapper tags." Note that ContainedNodeLabel tags are not needed when node siblings have different types. Thus "wrapper tags" are not needed for most child nodes in the VRML 97 node set. An Event consists of a timeStampX3d and a field value. An event is a message sent from one node to another, as defined by a ROUTE. Events signal external stimuli, changes to field values, and interactions between nodes. Note existence of related and equivalent org.w3c.dom.events.Event.timeStamp. Geometry nodes produce renderable geometry and are contained by a Shape node. Grouping nodes can contain other nodes as children, thus making up the backbone of a scene graph. Interpolator nodes are designed for linear keyframed animation. Interpolators are driven by an input key ranging [0..1] and produce corresponding piecewise-linear output functions. Light nodes provide illumination for rendering geometry in the scene. SceneGraphStructureNodeType is a marker interface that identifies nonrenderable nodes relating to scene graph structure. Work in progress: trying to capture wildcard capability so that USE nodes can appear anywhere. Problematic, so far. Color node renamed ColorNode in order to avoid an interface naming collision with the Color field type for RGB values. field can contain either attribute-value or node content. field is used by ExternProtoDeclare, ProtoDeclare and Script nodes. fieldValue can contain either attribute-value or node content. fieldValue is used by ProtoInstance nodes, reinitializing default values specified in ProtoDeclare field tags. ROUTEs can also be added or removed via the Scene node, or via a ProtoDeclare node. Geocentric Global Coordinate System (GeoMetadata node only) Geodetic Geocentric Equatorial Inertial Geocentric Solar Ecliptic (GeoMetadata node only) Geocentric Solar Magnetospheric (GeoMetadata node only) Lambert Conformal Conic PCS (GeoMetadata node only) Local Space Rectangular (GeoMetadata node only) Polar Stereographic PCS (GeoMetadata node only) Solar Magnetic (GeoMetadata node only) Transverse Mercator (GeoMetadata node only) Universal Transverse Mercator (GeoMetadata node only) HumanoidNodeType enables extensibility for the Humanoid node.