What rules do resources pointed to by URIs for XLinks `role` and `arcrole` attributes have to adhere to?

54 views Asked by At

That is (examples taken from the latest XLink 1.1 spec),

<go ... xlink:arcrole="http://www.example.com/linkprops/auditor" ...>
<my:crossReference ... xlink:role="http://www.example.com/linkprops/studentlist" ...>

what could the content of the http://www.example.com/linkprops/studentlist resource be?

Is it totally arbitrary, only constrained by the developer/platform/etc, or does it have to have a specific format (e.g., XML, conforming to a specific schema, etc.)?

Based on the quote below, I would say that it is arbitrary, but I couldn't find any examples yet:

Attribute title provides a human-readable description of the [extended] link, and attribute role provides a machine-readable description of the link.

Also, from XML in a Nutshell, 2nd Edition:

  • 10.4.2.3. Arc roles:

    [..] this URI should point to a resource that indicates which relationship the arc describes (e.g., parent-child, employer-employee). For instance, we might add an xlink:arcrole attribute to the purchase arc that pointed to the URL http://www.example.com/purchase_details.txt. The file purchase_details.html might then contain the text "will be bought from." This would indicate that the source of the link is bought from the target of the link; that is, "The Wonderful Wizard of Oz will be bought from Amazon", or "The Wonderful Wizard of Oz will be bought from Fatbrain", or "The Wonderful Wizard of Oz will be bought from Barnes & Noble". However, although this usage is suggested, XLink processors will not enforce it, and indeed there's really no way they could be asked to do this since that would require that they actually understand what they read.

  • the xlink:role attribute contains an absolute URI that somehow describes or annotates the remote resource

    Although can't fathom how the example links, such as http://www.williammorrow.com, are useful as roles at all.


Some mentions from the spec:

(It also doesn't help that the same section uses "roles" interchangeably with "labels"...)

Some other sites I've found:

1

There are 1 answers

0
toraritte On

Found the answer in the 3rd edition of XML in a Nutshell, Link Semantics chapter:

The xlink:role attribute contains a URI that somehow indicates the meaning of the link. For instance, the URI http://www.isi.edu/in-notes/iana/assignments/media-types/text/css might be understood to mean that the link points to a CSS stylesheet for the document in which the link is found. However, there are no standards for the meanings of role URIs. Applications are free to assign their own meaning to their own URIs.

For example, this book element is a simple XLink that points to Scott’s author page at O’Reilly. The xlink:title attribute contains his name, while the xlink:role attribute points contains the URI for the Dublin Core creator property, thereby indicating he’s an author of this book.

<book xlink:type="simple"
xlink:href="http://www.oreillynet.com/cs/catalog/view/au/751"
xlink:title="W. Scott Means"
xlink:role="http://purl.org/dc/elements/1.1/creator" >
 XML in a Nutshell
</book>