Adding XML ids to your document manually

DToC uses XML ids as index locators. Every index item is associated with one or more paragraphs; their function is analogous to that of page numbers used in print indexes.

If your document is small, you can add your own XML ids. If you have a larger document, we suggest that you open your document in Oxygen where you can add XML ids quickly and easily (see the document "Adding XML ids with oXygen").

  1. Add an XML id within the 'p' tags in your document. To do this insert your cursor between the ‘p’ text and the right angle bracket and add an xml:id='' attribute.
    It is optional to assign XML ids located in the TEI Header.
  2. Assign values to your XML ids.
    Your ids can be a letter or a numerical value, but you must differentiate between the different tags.
  3. Finish adding XML ids to all of your 'p' tags.
    You can add XML ids to any type of tag. For example, if you would like to index any citations in your document, you can add XML ids to the 'note' tags. Alternatively, if you would like to cross reference your index, you can also add XML ids to the 'item' tags. For more information please refer to the document "Creating Cross Referencing Index terms" linked below.

Open the XML document, “A Scandal in Bohemia: Chapter 1”.

Each paragraph within the body of text can be tagged with a unique identifier. For example, you can use “P” followed by the number corresponding to each particular paragraph's location in the corpus. So the fifth paragraph would be “P5”.

You can use a combination of letters and numbers, but you cannot have spaces located within the XML id attribute. You can replace spaces with underscores. Each paragraph, even if they are in different chapters, needs a distinct id.