Adding XML ids to your document manually

DToC uses XML ids as index locators; every index item is associated with one or more paragraph (as opposed to pages 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 a XML id within your '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 numerical value, but you must differentiate between the different tags.
  3. Finish adding XML ids to all 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 to below.

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

For each paragraph within the body of text add an unique identifier. For example, you can use “P” and then the number of what paragraph it is. 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 use underscores. Each paragraph, even if they are in different chapters needs a distinct id.