Extensible 3D (X3D) encodings
Part 1: Extensible Markup Language (XML) encoding
Annex A
(informative)
X3D XML Document Type Definition (DTD)
(Updated using X3D Specifications: Schema and DOCTYPE Validation)
This annex provides a detailed description of the grammar for each syntactic element in this part of ISO/IEC 19776. Table A.1 contains a table of contents that lists the topics in this clause:
An XML Document Type Definition (DTD), also referred to as a DOCTYPE, is a grammar that defines the syntax of an XML tagset XML.
The X3D DTD has sufficient expressive power to:
The X3D DTD does not have sufficient expressive power to:
EXAMPLE Each of the following scene-graph fragments validate satisfactorily:
<Shape>
<Sphere/>
<Appearance>
<!-- https://htmlcolorcodes.com/colors/off-white -->
<Material DEF='MaterialOffWhite' diffuseColor='0.980392 0.976471 0.964706'/>
<ImageTexture DEF='ImageCloudlessEarth' url='"earth-topo.png" "earth-topo.jpg"'/>
</Appearance>
</Shape>
and
<Shape>
<Appearance>
<ImageTexture DEF='ImageCloudlessEarth' url='"earth-topo.png" "earth-topo.jpg"'/>
<!-- https://htmlcolorcodes.com/colors/off-white -->
<Material DEF='MaterialOffWhite' diffuseColor='0.980392 0.976471 0.964706'/>
</Appearance>
<Sphere/>
</Shape>
Editors note: adding explanatory excerpts from X3D DOCTYPE source seems like unnecessary detail.
Current versions of X3D XML DOCTYPE files are maintained at
X3DVALIDATION.
Additional capabilities for validation of field values are provided by X3D XML Schema, X3D Regular Expressions (regexes) X3DREGEX, and X3D Schematron SCHEMATRON.1 SCHEMATRON.2 X3DSCHEMATRON.
NOTE Additional information about X3D XML scene structure, allowed field values, data type restrictions, authoring hints, warnings, and errors can be found in X3D Tooltips X3DTOOLTIPS and X3D Unified Object Model X3DUOM. Validation assets are maintained in human-readable and machine-readable forms, in version control, and with corresponding documentation at X3DVALIDATION.
x3d-3.0.dtd is the X3D DTD that validates model correctness for X3D version 3.0 content.
<!-- prior source document deleted for readability -->
x3d-3.0-InputOutputFields.dtd extends the X3D version 3.0 DTD by also
including fields with accessType inputOnly
and outputOnly
.
Although X3D scene files cannot validly set values for any of these attributes,
the DTD defines names and relationships of all fields and can be used by
DTD-aware processing tools.
<!-- prior source document deleted for readability -->
x3d-3.0-Web3dExtensionsPublic.dtd extends the X3D version 4.0 DTD and can be used to contain The public X3D DTD extension can be used to contain approved extensions that have not yet been included in ISO/IEC 19775-1 X3D Architecture. The form of the public X3D DTD extension is depicted below:
<!-- prior source document deleted for readability -->
x3d-3.0-Web3dExtensionsPrivate.dtd extends the X3D version 4.0 DTD and can be used to contain The private X3D DTD extension can be used to contain X3D extensions that have not been approved but may exist for testing future development. The form of the private X3D DTD extension is depicted below:
<!-- prior source document deleted for readability -->
x3d-3.1.dtd is the X3D DTD that validates model correctness for X3D version 3.1 content. Validation is backwards compatible with earlier versions of X3D models as well.
<!-- prior source document deleted for readability -->
x3d-3.1-InputOutputFields.dtd extends the X3D version 3.1 DTD by also
including fields with accessType inputOnly
and outputOnly
.
Although X3D scene files cannot validly set values for any of these attributes,
the DTD defines names and relationships of all fields and can be used by
DTD-aware processing tools.
<!-- prior source document deleted for readability -->
x3d-3.1-Web3dExtensionsPublic.dtd extends the X3D version 4.0 DTD and can be used to contain The public X3D DTD extension can be used to contain approved extensions that have not yet been included in ISO/IEC 19775-1 X3D Architecture. The form of the public X3D DTD extension is depicted below:
<!-- prior source document deleted for readability -->
x3d-3.1-Web3dExtensionsPrivate.dtd extends the X3D version 4.0 DTD and can be used to contain The private X3D DTD extension can be used to contain X3D extensions that have not been approved but may exist for testing future development. The form of the private X3D DTD extension is depicted below:
<!-- prior source document deleted for readability -->
x3d-3.2.dtd is the X3D DTD that validates model correctness for X3D version 3.2 content. Validation is backwards compatible with earlier versions of X3D models as well.
<!-- prior source document deleted for readability -->
x3d-3.2-InputOutputFields.dtd extends the X3D version 3.2 DTD by also
including fields with accessType inputOnly
and outputOnly
.
Although X3D scene files cannot validly set values for any of these attributes,
the DTD defines names and relationships of all fields and can be used by
DTD-aware processing tools.
<!-- prior source document deleted for readability -->
x3d-3.2-Web3dExtensionsPublic.dtd extends the X3D version 4.0 DTD and can be used to contain The public X3D DTD extension can be used to contain approved extensions that have not yet been included in ISO/IEC 19775-1 X3D Architecture. The form of the public X3D DTD extension is depicted below:
<!-- prior source document deleted for readability -->
x3d-3.2-Web3dExtensionsPrivate.dtd extends the X3D version 4.0 DTD and can be used to contain The private X3D DTD extension can be used to contain X3D extensions that have not been approved but may exist for testing future development. The form of the private X3D DTD extension is depicted below:
<!-- prior source document deleted for readability -->
x3d-3.3.dtd is the X3D DTD that validates model correctness for X3D version 3.3 content. Validation is backwards compatible with earlier versions of X3D models as well.
<!-- prior source document deleted for readability -->
x3d-3.3-InputOutputFields.dtd
extends the X3D version 3.3 DTD by also
including fields with accessType inputOnly
and outputOnly
Although X3D scene files cannot validly set values for any of these attributes,
the DTD defines names and relationships of all fields and can be used by DTD-aware processing tools.
<!-- prior source document deleted for readability -->
x3d-3.3-Web3dExtensionsPublic.dtd extends the X3D version 4.0 DTD and can be used to contain The public X3D DTD extension can be used to contain approved extensions that have not yet been included in ISO/IEC 19775-1 X3D Architecture. The form of the public X3D DTD extension is depicted below:
<!-- prior source document deleted for readability -->
x3d-3.3-Web3dExtensionsPrivate.dtd extends the X3D version 4.0 DTD and can be used to contain The private X3D DTD extension can be used to contain X3D extensions that have not been approved but may exist for testing future development. The form of the private X3D DTD extension is depicted below:
<!-- prior source document deleted for readability -->
x3d-4.0.dtd is the X3D DTD that validates model correctness for X3D version 4.0 content. Validation is backwards compatible with earlier versions of X3D models as well, with one significant variation.
A containerField
value defines the field relationship between a given node and its parent.
X3D version 4 default containerField
values were changed for all six X3dMetadataObject nodes
(MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataSet, MetadataString).
This change was applied to version 4.0 (and greater) of the X3D DTD and X3D Schema in order to facilitate
more-readable construction of large metadata structures.
No functional or naming changes to field interfaces were made in the X3D Architecture
ISO/IEC 19775-1 X3D Architecture.
This change can affect X3D files defined using the XML encoding that depend on implicit definition of
containerField
values in Metadata nodes by the X3D XML DOCTYPE declaration.
See X3D XML Schema, B.6.1 x3d-4.0.xsd
for examples showing how legacy X3D versions 3.0-3.3 XML content that depends upon implicit containerField
values
may need to be modified for consistent definition as X3D version 4.0 XML and later.
Editors note: copying source document excerpts here, even if just for latest version, seems superfluous.
x3d-4.0-InputOutputFields.dtd
extends the X3D version 4.0 DTD by also
including fields with accessType inputOnly
and outputOnly
Although X3D scene files cannot validly set values for any of these attributes,
the DTD defines names and relationships of all fields and can be used by DTD-aware processing tools.
Editors note: copying source document excerpts here, even if just for latest version, seems superfluous.
x3d-4.0-Web3dExtensionsPublic.dtd extends the X3D version 4.0 DTD and can be used to contain The public X3D DTD extension can be used to contain approved extensions that have not yet been included in ISO/IEC 19775-1 X3D Architecture. The form of the public X3D DTD extension is depicted below:
Editors note: copying source document excerpts here, even if just for latest version, seems superfluous.
x3d-4.0-Web3dExtensionsPrivate.dtd extends the X3D version 4.0 DTD and can be used to contain The private X3D DTD extension can be used to contain X3D extensions that have not been approved but may exist for testing future development. The form of the private X3D DTD extension is depicted below:
Editors note: copying source document excerpts here, even if just for latest version, seems superfluous.