ESP pages are written in XML. Here we describe what they look like.
You can find blank template pages (called
template-blank.xml) in the Oracc schemas directory installed on your own computer and in the
00web/ directory on Oracc. When you edit a template page in Emacs, save it as
FILENAME.xml, where FILENAME = the name of your file, with no spaces in it.
The content of each ESP page is defined in its own XML file. Here is an example of an XML page file:
<?xml version="1.0" encoding="utf-8"?> <esp:page xmlns:esp="http://oracc.org/ns/esp/1.0" xmlns="http://www.w3.org/1999/xhtml" > <esp:name>Home</esp:name> <esp:title>Home</esp:title> <html> <head> <meta name="DC.rights.copyright" content="Released under a CC-BY-SA 3.0 license"> </head> <body> <p>Good morning.</p> </body> </html> </esp:page>
All XML documents must start with the XML declaration:
<?xml version="1.0" encoding="utf-8?>
encoding attribute should match the encoding used to save the document; utf-8 is recommended in order that the characters display correctly.
The root element is
<esp:page>. The root element of an XML document must declare the namespace prefixes used in that document. Therefore, ensure that the first element in your document includes the following attributes:
<esp:name> element gives the short name of the page. Keep this short and meaningful as it will appear in the navigation menu and also becomes the page URL. Do not use any special characters (ṣ, š, etc.) within
<esp:name> as they will not display as part of a URL.
There then follows a skeleton HTML page.
<html> element can contain system elements (such as
<esp:image>) and a subset of valid XHTML elements (such as the paragraph,
<p>). The system elements are processed in various ways, most of which cause XHTML elements to be added to the final page. XHTML elements may be processed or may be copied directly to the final page.
Unrecognised elements of any kind (such as
<a href=""> or <h2> or mistyped elements such as
<esp:glsoarry>) will be stripped from the final page, but their content is retained and processed as normal. This is why we recommend using Emacs with the ESP schemas, so that you can check and correct your coding as you work.
The recognised XHTML elements are:
For details of these elements, please consult an XHTML reference such as w3schools.com. Always try to use a semantic tag (such as
<q>) in preference to a presentational tag (such as
<i>), athough be aware that semantic tags do not display in the same way over all browsers (e.g.,
<emph> displays as italics in some browsers and bold in others).
Note that the
<meta> element may be used to add Dublin Core metadata specific to each page.
DC.identifier are added automatically to each page where appropriate, and items common to all pages can be added within
parameters.xml. However, there are many other useful page-specific metadata items, including
DC.description, and so on, which may be placed within the head element on each page.
<meta name="DC.date.modified" scheme="DCTERMS.W3CDTF" content="2005-02-03" />
You can just leave the
head element empty though:
Ruth Horry & Eleanor Robson
Ruth Horry & Eleanor Robson, 'Understanding ESP page structure', Oracc: The Open Richly Annotated Cuneiform Corpus, Oracc, 2014 [http://oracc.museum.upenn.edu/doc/help/portals/pagestructure/]