Linking in XML
XML 'extensions' are separated from, but related to, the XML language.
Note: You can use the extensions on SGML documents, and largely on
SGML-correct HTML documents for that matter, but an SGML processor
will not understand it.
An XML processor is deemed to understand these.
SGML:
XML linking relates to:
- HTML
- XML takes the URL-based addressing from HTML (IETF RFC
1738).
- Absolute and relative addresses supported.
- HyTime
- XML adapts architecture attributes for link recognition.
- Element architecture: XML-LINK=
- Attribute name mapping: XML-ATTRIBUTES=
- Normally, these values are #FIXED in the DTD.
- Link types: linking 'inspired' on <clink> and <ilink> (but
much simpler).
- TEI
Short overview:
'Links'
- Links are what you see 'on screen' as a link source.
- Links have a role, a 'title', be in- or out-of-line, and have a
required behavior.
- Simple link: <SIMPLE>, refer to a single object directly.
cf. <A HREF=> and HyTime <clink>
- <SIMPLE HREF> holds the link end identification ('locator').
- Extended link: <EXTENDED>, 'collect' several resources for link end.
cf. <ilink>.
- Link behavior is expressed by SHOW=(embed,replace,new) and
ACTUATE=(auto,user).
'Locators'
HREF value
- HREF is URL
- URL may be extended by:
- name (i.e. element ID, not an HTML name!)
- a TEI extended pointer expression [sperb92], chapter 14.
Example:
|
Examples: [1]
<SIMPLE HREF="HTTP://HERE.AND.THERE/SOME/FILE.XML#A27"></>
<SIMPLE HREF="HTTP://HERE.AND.THERE/SOME/FILE.XML#ID(A27)"></>
<LOCATOR TITLE="SECTION ON COLOR MERGER"
HREF="#ID(A27)DESCENDANT(1,SECT)"/>
|
- Keywords such as CHILD and ID are used to walk through the element
tree.
- When a span of elements is intended, separate by ".."
Extended link groups
- <GROUP>, consists of <DOCUMENT>
- Used to collect links to external sources that have to be available
for correct document processing.
- <DOCUMENT> is only a link to the source.
Endnotes:[1] URL may also contain query; in that case, use e.g.:
<SIMPLE HREF="HTTP://HERE.AND.THERE/SOME/FILE.XML?XML-XPTR=ID(A27)">
References:sperb92 - C. M. Sperberg-McQueen, L. Burnard (ed.): Guidelines for electronic text encoding and interchange. (ACH-ACL-ALLC report TEI P2, draft vrs. 2.0) Oxford, 1992
Page created by © Arjan Loeffen