The xlink:arcrole and xlink:label Attributes

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 pathssee 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>  <!ATTLIST ASTRO_NEWS     xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"     xlink:type CDATA #FIXED "simple"     xlink:arcrole CDATA #REQUIRED     xlink:label CDATA #REQUIRED     xlink:show (new  replace  embed  other  none) #IMPLIED "replace"> 


Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net