1. Home
  2. Important Tags
  3. Links and cross-references:

Links and cross-references:

To add a link to a web page or to any internet address, either external or internal to our website, we will use the tag <ref>, with the following structure:

<ref type="url" target="http://elpais.com">Diario El País</ref>

<ref type="url" target="http://thebarumfabula.usc.es/guidelines/">Thebarum Fabula - Guía de Etiquetado</ref>.

And if we want to make a cross-reference to any element in our document, we must first make sure that the element has its @xml:id set, then we point to it from the @target of the <ref> (always preceded by #), which here will have a @type="cross".

For example, within a bibliographic reference <bibl>, thus:

	<author>Courtney, C.</author>
	<title level="a">cf. conjectures in <ref type="cross" target="#Hill1983"/></title>

Or within the declaration of a <witness> that contains a consensus codicum detailing which manuscripts it is composed of:

<witness xml:id="cett">
	<abbr type="siglum">cett.</abbr>
	ceteri codices aut omnes praeter eos qui separatim laudantur: <ref type="cross" target="#A"/>, <ref type="cross" target="#B"/> et <ref type="cross" target="#F"/>

As we can see from the examples, it has two obligatory attributes:

  • @type: the type of link it is. If it is an internet address, the value is "url", and if it is a cross-reference, the value is "cross".
  • @target: the actual address to which the link points. In internet addresses it is enough to cite the complete URL of the linked site; in cross-references the @xml:id of the referenced element is referred to. In the latter case, never forget the initial hash (#) before the value of @xml:id.

In addition, the tag may or may not have its own content node, as shown in the examples. In the case of internet links it will be the text that you want to be displayed in the final presentation (the name of the linked website or the desired text). In the case of cross-references, the page range cited can be added, if it is a work, as follows:

	<author>Baehrens, E.</author>
	<title level="a">cf. <ref type="cross" target="#Kohlmann1884">pp. xvii-xviii</ref></title>

<ref type="cross"> is very useful to cite in abbreviated form from the apparatus or the commentary any title in the bibliography and witness lists at the head of the document, in the <sourceDesc>, (cf. <sourceDesc>).

How can we help?