International SGML/XML Users' Group
<home>
<about>
<technology>
  <introdution>
  <modelling>
  <syntax>
  <presentation>
  <linking/>
  <graphics>
  <multimedia>
  <knowledge>
  <database>
</technology>
<membership>
<chapters>
<contact>
<news>
<events>
<search>

Related Linking Resources...
XLink
XPointer
HyTime
Links in markup ...

Both SGML and XML have an internal referencing mechanism that allows links to identified elements within a document. The referenced element must have an attribute that is of type ID (it can have any name but must be defined as having type ID in the schema document). The referring element must have an attribute that is of type IDREF. This type of linking (known as ID-IDREF) is commonly used to create graph like structures within markup (for applications where hierarchies alone are insufficient). An example of ID-IDREF is given below:

    <element id="42">content</element>
    ...
    <referent idref="42"/>
The situation for external linking is more complex. SGML has an associated specification that deals with linking from SGML documents to other resouces. HyTime - Hypermedia/Time-based Structuring Language ISO/IEC 10744:1997 defines a mechanism for controlling links to external esouces and controlling the associated behaviours from within SGML documents.

The linking abilities of XML systems are also very powerful. Links can be created both within documents and externally to other documents. Links can be simple or complex, behaviours defined and multiple destinations specified. The linking technology allows users to manage bidirectional and multi-way links, as well as links to a span of text rather than to a single point.

The XML Linking Specification (XLink) and XML Extended Pointer Specification (XPointer) documents contain the details. An XML link can be either a URL or a TEI-style Extended Pointer (XPointer), or both. A URL on its own is assumed to be a resource; if an XPointer or XLink follows it, it is assumed to be a sub-resource of that URL; an XPointer on its own is assumed to apply to the current document (all exactly as with HTML).

An XLink is always preceded by one of #, ?, or |. The # and ? mean the same as in HTML applications; the | means the sub-resource can be found by applying the link to the resource, but the method of doing this is left to the application. An XPointer can only follow a #.

Copyright 2002 ISUG