ZVON > Tutorials > XLink - Extended Links
Prev | Next | [Help]

8. arc-type elements

Description

The arc-type element indicates rule for traversing among resources participating in extended-type link.




arc-type element

 <mythology>
   <god
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xlink:type="locator"
      xlink:href="http://www.greece.antique/database/zeus.xml"
      xlink:role="http://www.greece.antique/god"
      xlink:title="Zeus"
      xlink:label="zeus">
   </god>
   <hero
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xlink:type="locator"
      xlink:href="http://www.greece.antique/database/heracles.xml"
      xlink:role="http://www.greece.antique/hero"
      xlink:title="Heracles"
      xlink:label="heracles">
   </hero>
   <relation
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xlink:type="arc"
      xlink:from="zeus"
      xlink:to="heracles">
   </relation>
 </mythology>


Error - arc-type element duplication
Each arc-type element must have a pair of from and to values that does not repeat the from and to values (respectively) for any other arc type element in the same extended link; that is, each pair in a link must be unique. But what with possible multiple relationship (like in this case)?

 <mythology
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xlink:type="extended">
   <goddess
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xlink:type="locator"
      xlink:href="http://www.greece.antique/database/hera.xml"
      xlink:role="http://www.greece.antique/goddess"
      xlink:title="Hera"
      xlink:label="hera">
   </goddess>
   <god
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xlink:type="locator"
      xlink:href="http://www.greece.antique/database/zeus.xml"
      xlink:role="http://www.greece.antique/god"
      xlink:title="Zeus"
      xlink:label="zeus">
   </god>
   <relation
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xlink:type="arc"
      xlink:from="hera"
      xlink:to="zeus"
      xlink:arcrole="http://www.greece.antique/relations/sister">
   </relation>
   <relation
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xlink:type="arc"
      xlink:from="hera"
      xlink:to="zeus"
      xlink:arcrole="http://www.greece.antique/relations/wife">
   </relation>
 </mythology>