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

6. Attribute role

Description

The attribute role describes the meaning of the resource.




Role attribute
The value of the role attribute must be a URI reference. It identifies some resource that describes the intended property.

<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">
</hero>
<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">
</god>
<woman
   xmlns:xlink="http://www.w3.org/1999/xlink"
   xlink:type="locator"
   xlink:href="http://www.greece.antique/database/alcmene.xml"
   xlink:role="http://www.greece.antique/woman"
   xlink:title="Alcmene">
</woman>


Error - illegal value of the role attribute
The value of the role attribute must be a URI reference.

 <hero
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xlink:type="locator"
    xlink:href="http://www.greece.antique/database/heracles.xml"
    xlink:role="Ancient mythic hero"
    xlink:title="Heracles">
 </hero>