3.4.1.1 Any element of the types defined in 3.3.2 that is a child of a definition element shall include a name attribute to identify the element.
3.4.1.2 Any element of the types defined in 3.3.2 inside the PRM file body may include a name attribute to identify the element.
3.4.1.3 The value of the name attribute of an element shall be unique among the entity type of the element and considering both the PRM body plus all definitions.
3.4.2 NAME REFERENCING
3.4.2.1 Any element of the types defined in 3.3.2 inside the PRM body or definition may include a ref attribute to refer to another element by its name attribute.
3.4.2.2 The value of the ref attribute of an element shall match the value of the name attribute of one of the elements of the same element type (as defined in 3.3.2) that appears before in the PRM body or definition.
3.4.2.3 Any element containing the ref attribute shall be designated as referencing element and the element with the same value in the name attribute as referenced element.
3.4.2.4 A referencing element shall not be a descendant of the corresponding referenced element.
3.4.2.5 The referencing element shall not follow the element type content as defined in 3.3.2. Their allowed child elements are given by the parameters of the referenced element, as defined in 3.4.3.
3.4.3 DEFINING, USING, AND OVERRIDING PARAMETERS 3.4.3.1 Overview
The use of parameters is intended to allow deferred instantiation of PRM elements between the definition and the body of the PRM request. This use case corresponds to the situation in which the information about the pointing element cannot be fully defined before the pointing timeline is completed. The parameter mechanism allows that an element that is described in the definition section (e.g., the axis of the instrument to be pointed) can be further referenced and completed in the body section within a timeline to define the direction to point to (e.g., the direction towards which the instrument axis has to point).
The following requirements define the implementation of parameters within a parent element. The terminology used refers to the parent as the element containing the parameters
and children as all elements within the parent that may be parameters of regular elements within the parent.
The referenced parent element declares some or all its children to be parameters by assigning a local name to them. The referencing parent element generates one child for each parameter in the reference parent element such that the local names are used to generate children elements within the referencing parent.
3.4.3.2 Requirements
3.4.3.2.1 A parent element that defines a parameter construct shall have the name attribute.
3.4.3.2.2 The localName attribute shall be used to identify the children of a parent element that are parameters.
3.4.3.2.3 The name of every parameter shall be unique within the parent element.
3.4.3.2.4 Only strings that result in valid XML element names (see reference [4]) shall be used as the value for the localName attribute.
3.4.3.2.5 An element with the localName attribute shall only act as the parameter of the parent and not as the parameter of any ancestor of the parent.
3.4.3.2.6 A parent referencing element of a parameter construct shall have the ref attribute.
3.4.3.2.7 If the referenced parent element does not have parameters, the referencing parent element shall be an empty element.
NOTE – Parent elements that contain only regular children and no parameters do not expand any children in the parent referencing process. Regular elements are fully defined in the declaration of the parameter construct (within the referenced parameter) and the resulting referencing parent is therefore an empty element.
3.4.3.2.8 If the referenced parent element has parameters, the referencing parent element shall define child elements for all parameters in the referenced parent element.
NOTE – The child element name and type is given by the parameter name (i.e., value of localName) and type (type of the child element in the referenced parent).
3.4.3.2.9 The referencing parent element shall be built substituting each parameter in the referenced parent element with the corresponding child element in the referencing parent element.
NOTE – If the referencing element contains child elements corresponding to the referenced element parameters, the entities described by the referencing and the referenced element differ.
3.4.3.2.10 When a referenced element is descendant of a definition element, the parameter elements may be left empty.
3.4.3.2.11 When a parameter of a definition element is left empty then it shall be present as a child of the referencing element,
NOTE – A parameter may be given a value not requiring then further substitution in the referencing parent element; in this case the value is that of the parameter within the referenced parent element. This can be interpreted as a default value for the parameter. When the parameter is given no value within the referenced parent element then it is necessary to expand it in the referencing child element.
3.4.4 DISCUSSION—EXAMPLES
The following example shows the naming of elements and element parameters and default substitution.
<dirVector name="axis1">
<dirVector frame="EME2000" localName="Parameter1"> 0. 0. 1. </dirVector>
<rotation>
<!--- Naming of an element to be rotation1 --->
<rotation name="rotation1">
<axis frame="EME2000"> 1. 0. 0. </axis>
<!--- Naming of a parameter to be angle1 --->
<!--- Parameter has default units and value --->
<angle localName="angle1" units="deg"> 0. </angle>
</rotation>
<rotation name="rotation2">
<axis frame=" EME2000"> 0. 1. 0. </axis>
<!--- Naming of a parameter to be angle2 --->
<!--- Parameter has default units but no default value --->
<angle localName="angle2" units="deg" />
</rotation>
</rotation>
</dirVector>
Figure 3-2: Discussion Example Definition
Referencing and parameter substitution (conventional substitution):
<!--- Conventional substitution where units are taken by default from referenced parameters and values are given --->
<block ref="rotation1">
<angle1>180.0</angle1>
</block>
<block ref="rotation2">
<angle2>90.0</angle2>
</block>
Figure 3-3: Discussion Example (Conventional Substitution)
Referencing and parameter substitution (with units overriding in substitution):
<!--- Substitution where units are overridden and values are given --->
<block ref="rotation1">
<angle1 units="rad">3.141593</angle1>
</block>
<block ref="rotation2">
<angle2>90.0</angle2>
</block>
Figure 3-4: Discussion Example (with Units Overriding in Substitution)
Referencing and parameter substitution (all by default):
<!--- All substitution by default from reference parameters --->
<!--- Rotation 1 angle is 0.0 in degrees taken from referenced element --->
<block ref="rotation1" />
<!--- Angle in rotation 2 cannot be given by default as it has no value
given in the referenced parent element and therefore must be present --->
<block ref="rotation2">
<angle2>90.0</angle2>
</block>
Figure 3-5: Discussion Example (All by Default)
4 PRM TEMPLATES FOR COMMON, GENERIC POINTING