Encoding Your Annotation - LiteratureInContext/LiC-data GitHub Wiki

Sample Annotation Text with Image and Caption

sample-annotation

XML of the Annotation

Identifying the word or phrase to be annotated

The following is a portion of text in the XML file:

<p>….My heart palpitated in the sickness of fear; and I hurried on with irregular steps, not daring to look about me:— <ref target=”rime_" corresp="rime"> Like one who, on a lonely road, Doth walk in fear and dread, And, having once turned round, walks on, And turns no more his head; Because he knows a frightful fiend Doth close behind him tread.</ref>.</p>

Important Note

When your annotation comes together, you will need two distinct identifiers for it; these will be used in the markup below. Use a clear and understandable keyword. That keyword will contain a prefatory underscore "_" when identifying the @target for your reference and the note itself. For instance, "rime" is the basic identifier; this is used in and elements, and it is visible to the viewer. "_rime" is also used in both and elements, but it is associated with the attributes @corresp.

Required markup

The “ref” element in TEI XML indicates a reference. You’re turning the text “Like one who….” into a link to your annotation by enclosing the text in the element .

@target

@target is an attribute of the element indicating the target—or where the points. In this case, it’s pointing internally, to the note called “rime_”. This is part of what enables the note and the reference to connect to one another.

@corresp

@corresp is another attribute of the element indicating how the note should correspond to its target. This attribute will also form the visible identifier of the note, the same way a number might indicate a footnote.

XML of the note

The can appear anywhere in the body of the TEI. It is helpful to put it as close to the as possible, in case the numbering needs to be changed. The element contains all annotation content.

<note xml:id="rime" target="rime_" type="editorial" resp="editors.xml#TH"> <p><graphic url="notes/mariner-bay.jpg” alt=”An engraving from the 1879 illustrated edition of The Rime of the Ancient Mariner showing a desolate, moonlit bay filled with broken ships.” source=”https://www.loc.gov/resource/gdc.00013715105/” caption=”Illustration by Gustave Doré (1889), Library of Congress”>Victor Frankenstein here quotes Samuel Taylor Coleridge’s poem, “<ref target="https://en.wikisource.org/wiki/Lyrical_Ballads_(1798)/The_Rime_of_the_Ancyent_Marinere">Rime of the Ancient Mariner</ref>.” Coleridge’s most famous poem is a tale narrated by a sailor returned from a long, ambitious journey during which, having shot and killed an albatross, all other members of the crew die and the mariner is cursed. Shelley was familiar with Coleridge’s Romantic poem and invokes it to help us understand Victor Frankenstein. To learn more about Coleridge’s poem, first published in 1789 as the opening poem in <hi rend=”italic”>Lyrical Ballads</hi></ref>, listen to <ref target="https://www.bbc.co.uk/programmes/m000srdx”>this podcast from the BBC</ref>. The image included here, <ref target=” https://www.loc.gov/resource/gdc.00013715105/?sp=125&r=-0.535,-0.062,1.955,1.533,0”>from a later digital edition of the poem illustrated by Gustave Doré</ref>, shows a moonlit bay filled with broken ships carrying dead men. </p> </note>

Required markup

<note>

The <note> element opens the encoding for the annotation.

@xml:id

@xml:id is an attribute of the element, providing the id of the note to come. Notice that this xml:id is the same as the @corresp in the <ref> element, above.

@target

@target is another attribute of the element, connecting this note back to the . @type is an attribute indicating the @tye of . In this case, the note is an editorial note. @resp is another attribute of the element, indicating who is responsible for crafting the annotation. In this case, the @resp points to an XML file called editors.xml, and within that file, a target identified by an xml:id “TH”. Each named author will have a corresponding unique identifier—two or three letters associated with their name—recorded in the editors.xml file.

Optional additions

<p>

<p>The paragraph element opener—everything between this opening <p> element and the closing

element is encoded as a paragraph. If you use the <p> element, be sure all the content, including the image if used, is wrapped inside.

<graphic>

The <graphic> element indicates that an image has been added to the note. The <graphic> element contains a lot of attribute information (url, alt, source, and caption).

@url

If you use an image in your annotation, the @url attribute is required. The @url attribute is a pointer to the web address where the image is stored. The app fills out the URL with other content, so authors only need to include the sub-folder “notes” with the filename of the saved image “mariner-bay.jpg”.

@alt

If you use an image in your annotation, the @alt attribute is required. The @alt attribute provides the alternative text description of the image, an accessibity requirement.

@source

If you use an image, the @source attribute is required The @source attribute indicates the resolvable web address from which the image was originally sourced. This will become a link from the caption.

@desc

If you use an image, the @desc attribute is required. The @desc attribute contains the text of the caption for the image, which will be visible to readers. It will also be a clickable link that points to the @source provided.

⚠️ **GitHub.com Fallback** ⚠️