Revision of Name Scope from Thu, 11/05/2015 - 20:07
Name scoping rules in the DOM Environment follow HTML. All X3D content resides within a single scope and is shared with HTML. This differs from the Classic Environment where each X3D file or prototype instance are in their own name-scope. Note that it is not necessary to use the IMPORT/EXPORT feature with the Inline node because all nodes are withing a single name-scope. Nodes created programmatically and added to the X3D scene are also part of the single name-scope.
DEF/USE/COPY Semantics
Node names are all part of a single name space. It is up to the developer to maintain uniqueness across all of the nodes in the scene. The USE statement does not create a copy of the node. Instead, the same node is inserted into the scene graph a second time, resulting in the node having multiple parents. The COPY statement creates a copy of the node with reference to the original. Any changes to the original are propigated to all copies. A copy of a node may over-write any field of the original. Over-written fields are not effected by changes to the parent.
id Semantics
Nodes may use the HTML id attribute. These nodes can then be accessed using their id value through normal DOM mechanisms, including JavaScript libraries that are not part of X3D, but adhere to the HTML5 DOM standard.