MetadataSet
Overview
MetadataSet contains a list of Metadata* nodes that each have containerField='value'
and together provide information about the parent node of the MetadataSet. Further information about this specific MetadataSet node may be provided by a single child Metadata* node with containerField='metadata'.
The MetadataSet node belongs to the Core component and requires at least level 1, its default container field is value. It is available from X3D version 3.0 or higher.
Hierarchy
1
2
+ X3DNode
+ MetadataSet (X3DMetadataObject)*
* Derived from multiple interfaces.
Fields
SFNode [in, out] metadata NULL [X3DMetadataObject]
Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.
Hint
SFString [in, out] name “”
Depending on the metadata vocabulary, the attribute name is usually required for metadata nodes.
Hints
- Well-defined names can simplify design and debugging through improved author understanding.
- X3D Scene Authoring Hints, Naming Conventions
Warning
- name field is not included if this instance is a USE node, in order to avoid potential mismatches.
SFString [in, out] reference “”
Reference to the metadata standard or definition defining this particular metadata value.
MFNode [in, out] value [ ] [X3DMetadataObject]
The value field provides a list of X3DMetadataObject nodes whose meaning is determined by the name field.
Advice
Hints
- Typically use
containerField='value'
if the parent node is MetadataSet. - Explicitly defining containerField for Metadata nodes is always allowed and also unambiguous across each version of X3D.
- Each of the Metadata nodes are allowed as top-level root nodes in a scene, if doing that be sure to explicitly define
containerField='metadata'.
- If present, an IS statement is the first child within any other node.
- An IS statement precedes any sibling Metadata* node, which in turn precedes any other sibling nodes.
- MetadataSet can contain other MetadataSet nodes.
- Comments are not readable when a model file is loaded for viewing, but WorldInfo and Metadata* nodes are persistent and inspectable at run time.
- X3D for Web Authors, Chapter 15, Metadata Information
Warnings
- Default
containerField='metadata'
in X3D 3 changed to defaultcontainerField='value'
in X3D 4.0, allowing construction of much terser MetadataSet vocabulary structures. - Metadata nodes can only contain other Metadata nodes.