The xlink:arcrole and xlink:label Attributes

The xlink:arcrole attribute is set to a URI and holds the “role” of the link in an arc. (Arcs can support multiple resources and various traversal paths—see the section “Creating Arcs with the xlink:from and xlink:to Attributes,” later in this chapter, for more on arcs.) Such links can be in multiple arcs and can have a different meaning in each. For example, a link may represent a person who is a son in one arc and a father in another. The xlink:label attribute holds, as you might guess, a human-readable label for the link.

Don't forget that you need to declare xlink:arcrole and xlink:label if you want to create valid documents. That might look something like this in a DTD:

 <!ELEMENT ASTRO_NEWS> ...

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.