Link value strategies

For many purposes, unique identifiers can be generated automatically by software, and references can also be inserted automatically. But issues arise when unique identifiers, or just the references to them, must be created by hand. In such cases, the scheme chosen for assigning identifiers must be convenient for authors to use.

Sequential assignment

One approach is to use simple code numbers. If the last element likely to be the target of a reference was assigned an identifier of 'X-77776' (recall that identifiers cannot start with a digit), then the next element is assigned an identifier of 'X-77777'.

These identifiers may be inserted automatically by editorial or database software. But, because the identifiers are not intuitive, and hard to memorize even when frequently referring to the same target element, it is necessary for authors to look up the identifier (in the most extreme case by scrolling to the target element itself and looking at its attribute value). This can be a time-consuming, and therefore costly, process.

Meaningful names

A simpler and more intuitive technique that many HTML users will be familiar with involves identifiers that describe the content of the target element. When the target element is a title, or has a title, this could even be a copy of the title:

See <xref idref="Summary">Summary</xref>
...
<title id="Summary">Summary</title>

This approach is suitable for small documents (such as Web pages), especially when distinctive titles are used throughout the document.

Standards for abbreviating longer titles must obviously be established, or there will still be a need to check each reference against the target locator. For example, the identifier could be built from the first five (legal) characters of the first word, a dash, then the first letter of each subsequent word, with all letters folded to lower-case, so 'Contents List' becomes 'conte-l'. But duplicate names are still a danger using such a scheme. For example, 'Contemporary Life' would be coded in the same way as 'Contents List'.

Reference numbering

For long, numbered documents, an abbreviated reference scheme may be considered appropriate. This scheme makes use of the navigation methods devised for printed output, such as 'see Chapter 7, Paragraph 12', but codifies this information, for example, 'ch7pa12'. This approach allows for automatic generation of resource identifier values. Second, and more importantly, document authors can deduce the target value from the reference text itself, so do not have to look up the value anywhere else:

see <xref idref="#ch7pa12">Chapter 7, Paragraph 12</xref>

But the problem with this approach is that when new material is inserted into the document, the numbering of material beyond this point will change. However, the reference text will also be affected, and it is assumed that procedures for correcting such problems are already well established. With clever software, it is even possible to automate the updating of both target and source locators.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.196.182