PREV NEXT
XML XLinks and XPointers:
Links to external resources such as other XML documents, HTML documents or images
- Utility:
- To define relationships between similar documents
- To define a sequence in which documents should be navigated
- To embed non-XML content in an XML document
- XLink attributes:
- Type (possible values are: simple, extended, resource, location, arc, title)
- Title – human readable string
- Href – destination URI of the link
- Role – function of link’s content
- Arcrole – function of link
- Show – how to render the link (new, replace, embed, other, none)
- Actuate – when to trigger the link (onRequest, onLoad, other, none)
- Simple links (XLink:type = “simple”) offer similar functionality to HTML hyperlinks while extended links offer greater capabilities
- Simple links are a subset of extended links.
- Simple links link two locations in one direction and the start of the link is always the declaration of the link itself.
- The combinations like xlink:show = “replace” and xlink:actuate:”onLoad” do not make any sense.
- Extended links allow more than one resource to be linked together and they may be specified out-of-line
- 3 types of extended links: inbound, outbound, third-party
- 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
- Extended links do not imply that their source is the document in which the link is located.
- Locator element: To specify the locations participating in an extended link. Attributes: href, role, title, label
- Resource element: To define participants in the link that are within the scope of extended link element. Attributes: role, title, label
- Arc element: To define the navigable connections between locators participating in an extended link. Attributes: arcrole, title, show, actuate, from, to
- Title element: Attributes: type
- 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.
- 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.
- 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.
- 3 ways to specify fragment identifiers: Bare names, Child Sequences, Full XPointers
- Bare Names: Shorthand notation is provided for pointing to elements with IDs
- Child sequences: pointed to be walking through the child element tree eg. /1/14/2
- Points: point location may be a node or a particular location within character content
Post Your Thoughts