Path with type modifier and repetition modifier

If a component of the path is defined with a repetition, then the meaning of the repetition modifier is unchanged.

For an example, an XML instance document contains this content:

<root>
          <child xsi:type="realtype" realattr="foo"/>
          <child xsi:type="otherrealtype">
                    <grandchild>mytext</grandchild>
          </child>
          <child xsi:type="realtype" realattr="bar"/>
</root>

The XML path that is used to select the value of realattr in the third repetition of child would be:

root.child(2){realtype}.&realattr

In this example, the (2) modifier still indicates the third element named child. For the remainder of the address, assume that this third repetition of the element has been redefined to be type realtype. If no repetition is indicated, then the default repetition is 0.

If you type in the address manually and reverse the order of these modifiers, then it does not change the order of operation or the interpretation.