Macro

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in book_prev() (line 775 of /home/drbiz/public/tools.realism.com/modules/book/book.module).

Primary tabs

Macro : X3DNetworkingNode {
SFString
[]
url
""
urls
MFString
[]
params
name=value string elements for substitution - see description.
Not yet implemented
SFBool
[out]
load
FALSE
MFString
[]
namespaceName
[]
SFBool
[]
mapDEFToID
SFNode
[]
nodes
NULL
X3DNode
SFElement
[]
parameters
NULL
MFElement
[]
param
NULL
SFString
[]
name
""
SFString
[]
value
""



}

Expands child nodes using symbol substitution and places them as a separate namescope as a child of Macro. The Macro node is non-functional and only provides a location in the scene graph.

X3D nodes are taken either from the external reference by url or the children of nodes (not implemented) element. If nodes element is non-empty, then it supercedes any external reference, and no attempt shall be made to access the external resource.

The substituion parameters are taken either from the params attribute or the parameters child element. All parameters from the attribute and child element are used with the child attributes taking priority. These contain the string substitution names and values for processing the X3D nodes. Each parameter represents a name/value pair where the name is used for substitutions and the value replaces all occurrences of %name% in the loaded nodes.

In the case of the attribute params, each name/value pair is an element of the MFString array of the form "name=value". There shall be exactly one equals sign in each element of params. If the child element method is used, then the parameters element shall have zero or more param elements. Each param element shall contain an attribute called name whose value is the name of the name/value pair. The value of the element is the value of the pair.

When processed, the system performs string replacement on all occurences of name that are surrounded by % (i.e., %name%). Matching is exact on case, spacing, and symbols. There is no escaping capability. During the substitution, the name and surrounding % are removed and the value put in its place. Regular X3D node parsing is performed after all substitutions have occurred.

The fields load, namespaceName, and mapDEFToID are not yet implemented. They are the standard fields for any X3DNetworkingNode.