Whether you will be managing the whole ESP portal site yourself, or are you just writing ESP pages that someone else will edit and upload, you will need to do some basic set-up.
You will need to:
The schemas are used by Emacs to check that the ESP file is valid. The templates save you time by providing editable outlines for the sorts of files your project is likely to need.
Download these two zip files: esp-schemas.zip
[/doc/downloads/esp-schemas.zip] and esp-templates.zip
[/doc/downloads/esp-templates.zip].
Create a directory (folder) called, say, oracc
, in the directory where your .emacs
file lives.
Unzip esp-schemas.zip
into the directory you just created (e.g., oracc
).
Open your .emacs
file and add this line of code to it:
(eval-after-load 'rng-loc '(add-to-list 'rng-schema-locating-files "~/oracc/schemas/schemas.xml"))
(Note that if you chose a different name/place for what we are calling the oracc
directory, you should replace ~/oracc
with the directory name you chose.)
Save your .emacs
file, quit Emacs and restart.
You can unzip esp-templates.zip
and keep it wherever it would be most useful to you, for instance in the directory where you plan to create your ESP site.
With the schemas installed, Emacs will validate your ESP files as you write. Invalid ESP pages will be omitted from your portal site on rebuild, so it is important to check their validity as you work.
When you open an ESP XML file, the XML
menu will appear. Make sure the Validation
option is checked on that menu. Emacs will choose the correct schema automatically if you edit with the ESP template files provided. However, you can change the schema Emacs is using by going to XML > Set Schema > For Document Type > ESP
at any time.
As you type, invalid coding will be highlighted red; correct coding will show shades of blue and brown. Look at the bottom bar of the window too, to see whether the file is Valid
or Invalid
. You can use the First Error
and Next Error
items on the XML
menu to find and fix coding errors.
Ruth Horry & Eleanor Robson
Ruth Horry & Eleanor Robson, 'Installing the ESP templates and schema', Oracc: The Open Richly Annotated Cuneiform Corpus, Oracc, 2019 [http://oracc.museum.upenn.edu/doc/help/portals/installingesp/]