Reference Annotation¶
Structural annotation for referring to other annotation types. Used e.g. for referring to bibliography entries (citations) and footnotes.
Not to be confused with Coreference Annotation!
Specification¶
Annotation Category: | |
---|---|
Declaration: |
|
Version History: | |
Since v0.11, external references since v1.2 |
|
Element: |
|
API Class: |
|
Required Attributes: | |
Optional Attributes: | |
|
|
Accepted Data: |
|
Valid Context: |
|
Extra Attributes: | |
|
Element: |
|
---|---|
API Class: |
|
Required Attributes: | |
Optional Attributes: | |
|
|
Accepted Data: |
|
Valid Context: | |
Extra Attributes: | |
|
Explanation & Examples¶
FoLiA allows for things like footnotes and bibliography entry using Note Annotation. In this section we show that
you can make references to these notes using the <ref>
element, this is a structure element, which implies that the references are
explicitly present in the text. The <ref>
element, however, carries an extra higher-order annotation function:
<s>
<t>We demonstrated this earlier.</t>
</s>
<ref id="mynote" />
Another example in tokenised data, and now we add the optional type
attribute, which holds the type of the FoLiA element that is referred to:
<s>
<w><t>We</t></w>
<w><t>demonstrated</t></w>
<w><t>this</t></w>
<w><t>earlier</t></w>
<w><t>.</t></w>
<ref id="mynote" type="note" />
</s>
You can optionally make explicit the symbol used for the reference. When no textual content is provided, whatever program renders the FoLiA document may assign its own numbering or symbol.
<s>
<t>We demonstrated this earlier.</t>
</s>
<ref id="mynote" type="note"><t>1</t></ref>
This is often needed for bibliographical references:
<s>
<t>We demonstrated this earlier.</t>
</s>
<ref id="bib.1" type="note"><t>(van Gompel et al, 2014)</t></ref>
As a structure element, the <ref>
element may contain other structure
elements such as words (Token Annotation) or even sentences (Sentence Annotation) or
paragraphs (Paragraph Annotation), which can in turn contain further linguistic
annotations.
Although we framed this section in the context of notes, the <ref>
element is
more general and can be used whereever you need to explicitly refer to other structure
elements. Common targets are figures, tables, divisions (sections, chapters,
etc).
Being a structure element, the note reference itself may carry an ID as well. Note that the ID attribute without the xml namespace always indicates a reference in FoLiA:
<s><t>We demonstrated this earlier.</t></s>
<ref xml:id="myreference" id="mynote" />
The difference between the reference element and the higher-order relations (Relation Annotation) needs to be clearly understood. Relation annotation lays relations between annotations of any kind and thus pertain strongly to linguistic annotation, whereas this reference element is a structural element that is explicitly shown in the text and draws a reference that is explicitly reflected in the text.
External references can also be made with the <ref>
element, which
effectively makes it a valid tool for hyperlinking. This is
done by setting the xlink:href
to point to the external resource and
by setting the format
attribute to the format of the external
resource. The format is understood to be a MIME type and its value defaults to
text/folia+xml
. When an external reference is made, the id
attribute is optional and points to an element inside the external resource.
<s>
<w><t>We</t></w>
<w><t>demonstrated</t></w>
<w><t>this</t></w>
<ref xlink:href="http://somewhere" xlink:type="simple"
format="text/html" id="section2">
<w><t>here</t></w>
</ref>
<w><t>.</t></w>
</s>
The <ref>
element has a text-markup counterpart called <t-ref>
, which can be used to link from untokenised text,
both for internal and external links, as shown in the next two examples:
<s>
<t>We demonstrated this earlier. <t-ref id="mynote" /></t>
</s>
<s>
<t>We demonstrated this <t-ref xlink:href="http://somewhere" xlink:type="simple" format="text/html" id="section2">here</t-ref>.</t>
</s>
The method of hyperlinking described in this section can be contrasted to the more generic one described in Hyperlinks. The <ref>
(and
<t-ref>
) element offers a highly semantic way of hyperlinking, especially suited for explicitly linking to other
internal FoLiA elements, whereas the other hyperlinking method is more of a text-markup or stylistic nature and more
suited for external hyperlinks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | <?xml version="1.0" encoding="utf-8"?> <FoLiA xmlns="http://ilk.uvt.nl/folia" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0.4" xml:id="example"> <metadata> <annotations> <text-annotation> <annotator processor="p1" /> </text-annotation> <note-annotation set="https://raw.githubusercontent.com/proycon/folia/master/setdefinitions/notes.foliaset.xml"> <annotator processor="p1" /> </note-annotation> <reference-annotation> <annotator processor="p1" /> </reference-annotation> <sentence-annotation> <annotator processor="p1" /> </sentence-annotation> <paragraph-annotation> <annotator processor="p1" /> </paragraph-annotation> <part-annotation> <annotator processor="p1" /> </part-annotation> </annotations> <provenance> <processor xml:id="p1" name="proycon" type="manual" /> </provenance> </metadata> <text xml:id="example.text"> <p xml:id="example.p.1"> <s xml:id="example.p.1.s.1"> <t>We demonstrated this earlier.</t> </s> <ref xml:id="example.ref.1" id="example.note.1" /> </p> <p xml:id="example.p.2"> <s xml:id="example.p.1.s.2"> <t>We demonstrated this earlier.<t-ref id="example.note.1" type="note" /></t> </s> </p> <note xml:id="example.note.1" class="footnote"> <part> <t>See our website.</t> </part> <ref xml:id="example.ref.2" xlink:href="https://github.io/folia" xlink:type="simple" format="text/html" /> </note> <note xml:id="example.note.2" class="footnote"> <t>See our website.<t-ref xlink:href="https://github.io/folia" xlink:type="simple" format="text/html" /></t> </note> </text> </FoLiA> |