XML XLinks and XPointers


Links to external resources such as other XML documents, HTML documents or images

  1. Utility:
    1. To define relationships between similar documents
    2. To define a sequence in which documents should be navigated
    3. To embed non-XML content in an XML document
  2. XLink attributes:
    1. Type (possible values are: simple, extended, resource, location, arc, title)
    2. Title – human readable string
    3. Href – destination URI of the link
    4. Role – function of link’s content
    5. Arcrole – function of link
    6. Show – how to render the link (new, replace, embed, other, none)
    7. Actuate – when to trigger the link (onRequest, onLoad, other, none)
  3. Simple links (XLink:type = “simple”) offer similar functionality to HTML hyperlinks while extended links offer greater capabilities
  4. Simple links are a subset of extended links.
  5. Simple links link two locations in one direction and the start of the link is always the declaration of the link itself.
  6. The combinations like xlink:show = “replace” and xlink:actuate:”onLoad” do not make any sense.
  7. Extended links allow more than one resource to be linked together and they may be specified out-of-line
  8. 3 types of extended links: inbound, outbound, third-party
  9. Elements that have extended Xlink attributes have 4 sub-elements : Locator element, Resource elements, arc element and title element and 3 attributes: type, title, role
  10. Extended links do not imply that their source is the document in which the link is located.
  11. Locator element: To specify the locations participating in an extended link. Attributes: href, role, title, label
  12. Resource element: To define participants in the link that are within the scope of extended link element. Attributes: role, title, label
  13. Arc element: To define the navigable connections between locators participating in an extended link. Attributes: arcrole, title, show, actuate, from, to
  14. Title element: Attributes: type
  15. Inline links: Extended links may be embedded in one of the resources participating in an extended link. Out-of-line extended links – a special type of arc element is used to indicate to an XLink-aware processor that out-of-line link exists for a particular document.
  16. XPointer: to point to some portion of an XML document – individual sub-tree, attributes or even individual characters that are part of the text content.
  17. HTML pointers use “#” (fragment identifier) to indicate that the text following it refers to a named anchor point, or fragment identifier in the targeted document.
  18. 3 ways to specify fragment identifiers: Bare names, Child Sequences, Full XPointers
  19. Bare Names: Shorthand notation is provided for pointing to elements with IDs
  20. Child sequences: pointed to be walking through the child element tree eg. /1/14/2
  21. Points: point location may be a node or a particular location within character content