|
Property "Repeat | Parameters for Inner Repeats" <xslparms> |
|
|
The "Repeat | For Each" property is used to select the required XML nodes. If all the nodes required are accessible relative to the selected node then "Parameters For Inner Repeats" property is not required. The Syntax
parameter-name:node-selection[;parameter-name:node-selection]
Example: "Parameter For Inner Repeats" Property is not used XML Data:
Repeat Properties of the container element:
The elements in the container:
The Result:
But if we want to access the XML nodes which are not directly accessible from the selected node we need to use "Parameters for Inner Repeat" property.
Example: "Parameter For Inner Repeats" Property is used
XML Data:
Repeat Properties of the container element:
The elements in the container:
The result:
The Explanation:
The first text element in the container is bind to the name of the student. The second one is bind to the course the student is attending with definition /courses/item[id = $id]/name
This definition queries the /courses/item nodes whose id node value is equal to $id. The XSL variable $id contains the course Id of the student as the result of id:course_id definition made within the "Parameter For Inner Repeats" Property. See Repeat Property.
|