Referencing Data Values (continued)

You can use the id and href attributes to multi-reference a value of the address element, as shown in the code example.

  • The common address is stored as a separate address structure and is identified by the id attribute.
  • This id is referenced from within each Student structure using the href attribute in the address element.

<m:Student>
  <regnum>A108</regnum>
  <fname>Rob</fname>
  <lname>Jenkins</lname>
<address href="#address1"/>
</m:Student>

<m:Student>
  <regnum>A121</regnum>
  <fname>William</fname>
  <lname>Jenkins</lname>
<address href="#address1"/>
</m:Student>

<m:address id="address1">
  <street>11, Oak Street</street>
 <state>Arkansas</state>
</m:address>

Click the Next button to continue.