Guide to making XML documents Ian Senior February 2009 webmaster@it.ox.ac.uk This is the master version of an original document. $LastChangedDate: 2009-06-12 12:38:53 +0100 (Fri, 12 Jun 2009) $$LastChangedBy: rahtz $$LastChangedRevision: 155137 $ Introduction Today, documents are usually prepared electronically using a word processor such as Word or OpenOffice. Such programs allow their users to make good-looking documents easily and quickly. However, there are problems associated with the multitude of different formats and programs used to produce documents. For instance: users can become locked into specific file formats; conversion to other formats becomes more difficult with time; the storage media used can quickly go out of fashion making document retrieval an expensive specialist service; formats change over time and vendors might not provide conversion mechanisms from old to new formats. OUCS has adopted an open, vendor independent format approach to maintain our documentation in an accessible and interchangeable format. Our system uses XML or eXtensible Markup Language to store documents. XML allows the user to develop their own rules to code up their documents. However, there are already many different versions of XML rules available so we do not need to develop anything new for OUCS. Our system uses a modified version of the Text Encoding Initiative (TEI) XML for writing documentation. TEI and OUCS The Text Encoding Initiative (TEI) Guidelines are an international and interdisciplinary standard that enables libraries, museums, publishers, and individual scholars to represent a variety of literary and linguistic texts for online research, teaching, and preservation. The TEI standard is maintained by a consortium of leading institutions and projects worldwide; Oxford is one of these institutions. Two of the major players in the TEI are members of OUCS: Lou Burnard and Sebastian Rahtz. Lou joined the Text Encoding Initiative project as its European Editor back in 1989 (a post he still holds), while Sebastian is one of the consortium's directors and actively develops the TEI itself. OUCS Web Site Accessibility Since 2002 it has been law to provide documents (including web pages) in accessible formats to users of alternative technologies such as screen readers. The relevant legislation is the Special Educational Needs and Disability Act (SENDA) 2001 which is part 4 of the Disability discrimination Act (DDA). This act brought Education establishments into line with commercial providers in the way that they provide information and services to the disabled community. The W3C organisation have created various standards for web accessibility. These are: Priority 1 (A) Priority 2 (AA) Priority 3 (AAA) Priority level details All OUCS pages should reach level 1 standard. The University has decided that its web sites should ideally conform to the level 2 standard and meet as many level 3 points as possible. The following document includes details on how to make your XML documents accessible to as wide an audience as possible. Please make sure that you follow these accessibility guidelines - it's the LAW! How does the OUCS system work? The OUCS XML documentation system has six components: An XML schema, derived from the Text Encoding Initiative, located at A set of XSLT stylesheets, which can transform document instances to HTML pages; see A set of XSLT stylesheets, which can transform document instances into PDF for printing; see CSS stylesheets for displaying the XML files directly (, which can also be used with some editors), and for enhancing the HTML versions () The XML text document The change management system where all the material is stored Taking each of these parts in turn: XML Schema The rules of the TEI XML format are stored in a schema (we use the RELAXNG schema language) file. This file defines the structure of how XML is to be written and is the key to transforming the text from one format to another. In order to write a valid TEI XML document the schema has to be followed. Luckily there are many XML editors that look after the schema for you and show any errors when the document is tested against the schema. XSLT Stylesheets An XSLT Stylesheet or Extensible Stylesheet Language Transformation Stylesheet is basically a set of rules to process a XML document. It turns an XML rendition of a file into the final version of a file. OUCS uses two versions of XSLT files, one turns an XML file into a web page (HTML format), the other turns XML into PDF format for printing. CSS Stylesheets CSS or Cascading Style Sheets are files containing information on how a document is to be presented e.g. bold, red headings or grey backgrounds. There are two versions used by OUCS: one displays the XML file directly and is fairly simple; the other displays the final web page and is fairly complex. Version Control System This is the method by which documents are stored. OUCS uses an open source system called Subversion to store XML documents. It is not restricted in the type of documents it can accept, allowing us to store just about anything we might need. Getting Started - The Basics There are a few steps that need to be taken before you can get documents up on the web site. These are outlined below: Obtain a suitable XML editor We recommend the cross-platform oXygen editor, for which we have a site licence; see the document on How to use oXygen at OUCS Obtain a Subversion client We recommend Syncro SVN, the client which comes with oXygen. Details are given in the document Using the Syncro Subversion client Obtain a Subversion account Accounts can be setup by visiting Write your document! This part is up to you! If you are unsure how to start, open an XML file and save under a different name. After removing the original content of the file, you can now use this file and add your own content as necessary. Before submitting your file to Subversion, you should check your document's syntax. Most XML editors have facilities to check the validity of your document against your schema. Make any corrections necessary before submitting the file to the main Subversion repository. Also bear in mind that your document should be fully accessible and SENDA compliant. A Few Definitions Elements and Tags XML documents have lots of elements, one example is the title element. This begins with a start-tag <title> and is closed by the end-tag </title>. Any text between the start and end tags is therefore defined as the title of the document. Most XML tags work in this way: a start tag, some text, followed by an end tag. There are some elements that are self closing (i.e. they have no end tag); where appropriate these will be highlighted later in this document. Content and Data Any text between tags is the content of the element. This can be of two forms: the actual information or data; and other elements. Where the two occur together this is termed mixed content. Attributes All elements can have additional properties beside the element name and content. These properties are the attributes of an element and they consist of name-value pairs. For example a <div> element can have the attribute id="xxx", where xxx represents a name or number. In the example below, the id is 'email': Configuring your email client text.... XML structure and nesting tags XML is very strict on its element structure, especially compared to HTML. In XML, tags usually have to be started and ended. They must be nested properly and used in the correct place within the document hierarchy. This generally means that you cannot open a new tag e.g. <p> without closing the previous <p> tag. (N.B. there are exceptions to this rule e.g. self-closing tags). Dissecting the OUCS XML Template Viewing the OUCS template code in your editor shows the document structure. The complete page structure is shown below: Markup for OUCS documents Sebastian Rahtz May 2009 webmaster@rt.oucs.ox.ac.uk This is the master version of an original document. $LastChangedDate: 2013-12-06 13:15:07 +0000 (Fri, 06 Dec 2013) $ $LastChangedBy: rahtz $ $LastChangedRevision: 155137 $ First comes the declaration that the file is a TEI document <TEI.2>. This is effectively the start tag for the document, all other elements must be correctly arranged or nested inside the <TEI.2> tags for the document to be valid TEI XML. The first element inside <TEI.2> is the <teiHeader> element. Everything within this element is part of the document's Metadata (Metadata is data about the document, e.g. its title, author, creation date etc.). OUCS documents have a number of fields in the <teiHeader>; some have to be manually completed, such as the title of the document, while others are automatically added on document submission e.g. Last changed by information. Usually, when writing your own documents, you should complete the following metadata elements: title author date It will also be necessary to complete an extra sections in the header recording who is responsible authority The end of the metadata is marked by the closing </teiHeader> tag. After the metadata comes the body of the document. This can be split into three sections: <front> contains any prefatory matter (headers, title page, prefaces, dedications, etc.) found before the start of a text proper. <body> contains the whole body of a single unitary text, excluding any front or back matter. <back> contains any appendices, etc., following the main part of a text. The majority of OUCS documents only use the body section for the text. This is shown in the next example: ... Your text goes in here.... If you do want to include front and/or back additions to your document, the sections are coded in the following manner: Markup for OUCS documents Ian Senior May 2005 Your text goes in here.... Appendix More text in here... Coding your document Like HTML, XML relies on elements to code up the document. If you are familiar with coding HTML files the transition to XML should be fairly painless. OUCS XML has many elements available for use, although in any one document only a subset of these will ever be applied. In this section we discuss the elements making up the body of a text. Sectioning your text Your text may be just a series of paragraphs, or these paragraphs may be grouped together into chapters, sections, subsections, etc. In the former case, each paragraph is embedded inside a the <p> element. In the latter case, the <body> may be divided into a series of <div> elements, which may be further subdivided. An example of div structure is shown below: This is my heading This is a paragraph This is my inner section heading This is a paragraph in the inner section Sectioning your document has important effects on the OUCS web site. Each div used is processed when the document is converted into html. Major divisions are treated as separate web pages and help to form the basis of the internal page navigation system. Each division is also sequentially numbered: 1, 2, 3 ... Where a div section is within another div, it is treated as a subsection and numbered accordingly e.g. 2.1, 2.2, 2.3.... Sectioning documents also influences the HTML output to browsers. The title of a document is always given the <h1> tag, major divisions are thus given the <h2> tag and minor section divisions are given <h3>, <h4>, <h5> etc. depending on how deep they are nested within the document. Correct structural markup for documentation is important for accessibility. When documents are marked up in a structured way, they allow users of alternative technologies to discover the main sections and subsections more quickly and more easily. The structure allows users to jump from one section to another, without the need to read all of the information on the page. Documents that do not use structured markup pose a problem (to screen reader users in particular), as it is very difficult to find out what is on a page without reading all of the text. Where structural markup has not been used, the author has often employed styles (bold, italic, etc.) to indicate different sections and headings. While obvious to sighted readers, the structure is lost to screen reader users who must read the page to find out if it is of interest to them. It is a requirement for authors to structure their documents in an accessible manner: relying on style alone is to be avoided as this results in inaccessible documents. The following elements can be used to divide up your text: <p> marks paragraphs in prose. <div> contains a subdivision of the front, body, or back of a text. When structural divisions smaller than a <div> are necessary, inner <div> elements may be used, without limit to the depth of nesting (see example above). A div element can have the following three attributes: type This indicates the conventional name for this category of text division. Its value might be something like Preface. id This specifies a unique identifier for the division, which may be used for cross references or other links to it, such as a commentary. It is often useful to provide an id attribute for every major structural unit in a text, and to derive the id values in some systematic way, for example by appending a section number to a short code for the title of the work in question. n The n attribute specifies a mnemonic short name or number for the division, which can be used to identify it in preference to the id. If a conventional form of reference or abbreviation for the parts of a work already exists (such as the book/chapter/verse pattern of Biblical citations), the n attribute is the place to record it. The attributes id and n, indeed, are so widely useful that they are allowed on any element in any TEI schema: they are global attributes. The value of every id attribute must be unique within a document. They may be used to derive the names of HTML pages, so giving sensible mnemonic names is a good idea. Headings and Closings Every <div> may have a title or heading, and (less commonly) a closing such as End of Chapter 1. The following elements may be used to mark them up: <head> contains any heading, for example, the title of a section, or the heading of a list or glossary. <trailer> contains a closing title or footer appearing at the end of a division of a text. Here is an example of their use: This is my heading This is the body of the text This is the trailer to my text N.B. At present it is not possible to use the <head> tag without using the <div> tag first. Marking Highlighted Phrases Changes of Typeface, etc. Highlighted words or phrases are those made visibly different from the rest of the text, typically by a change of type font, handwriting style, or ink color, intended to draw the reader's attention to them. <hi> marks a word or phrase as graphically distinct from the surrounding text, for reasons concerning which no claim is made. Code view: <hi>example</hi> Rendered view: example Alternatively, where the cause for the highlighting can be identified with confidence, a number of other, more specific, elements are available. All but the first two are OUCS extensions to the standard TEI markup. <emph> marks words or phrases which are stressed or emphasized for linguistic or rhetorical effect Code view: <emph>example</emph> Rendered view: example <term> contains a single-word, multi-word or symbolic designation which is regarded as a technical term Code view: <term>example</term> Rendered view: example <gi> An SGML, XML or HTML element name Code view: <gi>h1</gi> Rendered view: <h1> <Button> A button which a user can see Code view: <Button>Logout</Button> Rendered view: Logout <Code> Some sort of computer language code Code view: <Code>\textbf{a}$^34$</Code> Rendered view: \textbf{a}$^34$ <Command> The name of a command Code view: <Command>tcsh</Command> Rendered view: tcsh <Field> A labelled input field Code view: <Field>Subject</Field> Rendered view: Subject <Filespec> A file or directory specification of any kind Code view: <Filespec>C:\Windows\My Documents</Filespec> Rendered view: C:\Windows\My Documents <Icon> an icon in a GUI Code view: <Icon>Notepad</Icon> Rendered view: Notepad <Input> Text for a user to type Code view: <Input>quota</Input> Rendered view: quota <Key> A key to press Code view: <Key>R</Key> Rendered view: R <Keyword> A keyword in some technical code the user is being asked to write Code view: <Keyword>font-family</Keyword> Rendered view: font-family <Label> The label for a button, radio box, etc. Code view: <Label>select to activate account</Label> Rendered view: select to activate account <Link> The text of a link which is being described Code view: <Link>IT Information</Link> Rendered view: IT Information <Menu> A menu item Code view: <Menu>Save as</Menu> Rendered view: Save as <Output> What comes back when you give a command Code view: <Output>job completed</Output> Rendered view: job completed <Program> A simple program listing Code view: <Program>i:=0; j:=-1;</Program> Rendered view: i:=0; j:=-1; <Prompt> A prompt from the computer Code view: <Prompt>password:</Prompt> Rendered view: password: <Screen> A prettified display of text screenshot Code view: <Screen>Thanks! Your work is complete.</Screen> Rendered view: Thanks! Your work is complete. <Software> The name of a program Code view: <Software>Microsoft Word</Software> Rendered view: Microsoft Word <Value> A possible value for some option Code view: <Value>Times-Roman 10pt</Value> Rendered view: Times-Roman 10pt If you ever really need it, the <lb/> element marks the start of a new (typographic) line. Cross References and Links Explicit cross references or links from one point to another in a text in the same XML document may be encoded using the elements described in section . References or links to elements of some other XML document, or to parts of non-XML documents, may be encoded using the TEI extended pointers described in section . Accessibility of your links is important. The text you use can either enhance a user's understanding of where the link will lead, or leave them clueless. The worst phrase you can use for a link is Click Here or simply Here: in both instances the user is left with no clear idea of where the link could lead. This problem is compounded for a screen reader user: they can get lists of all links from any given page, but if the author of the page has just said Click Here or Here, they will get a list consisting of just that. The user will be left stranded on the page with no clear way to move forwards in their search for information. An accessible link is one that conveys both where the link will go and the information the user is likely to find. By default our system will add a title attribute to any link you make on your page when it is transformed into HTML. However, while this is good practice and a nice failsafe measure, it will only add the same text as the link text. This might be adequate in some circumstances, but to make your links more accessible you should add your own additional text using the n attribute. People browsing with modern visual browsers will see your additional link information when they mouse over your link, and screen reader users will have more information about where the link will take them as the title attribute is read out to them. Simple Cross References A cross reference from one point to another within a single document can be encoded using either of the following elements: <ref> a reference to another location in the current document usually modified by additional text. <ptr> a pointer to another location in the current document. These elements share the following attribute: target specifies the destination of the pointer. The difference between these two elements is that <ptr> is an empty element, simply marking a point from which a link is to be made, whereas <ref> may contain some text as well --- typically the text of the cross-reference itself. The <ptr> element would be used for a cross reference which is indicated by a symbol or icon, or in an electronic text by a button. The following two forms, for example, are equivalent: See especially section 12 on page 34. See especially . The value of the target attribute must be present in the current XML document. This implies that the passage or phrase being pointed at must bear an identifier, and must therefore be tagged as an element of some kind. In the following example, the cross reference is to a <div> element: ...see especially .... ... Concerning Identifiers... The id attribute is global (i.e. can be used on any element), which means all elements in a document can be pointed to in this way. In the following example, a paragraph has been given an identifier so that it may be pointed at: ...this is discussed in the paragraph on links ...Links may be made to any kind of element ... Sometimes the target of a cross reference does not correspond with any particular feature of a text, and so may not be tagged as an element of some kind. If the desired target is simply a point in the current document, the easiest way to mark it is by introducing an <anchor> element at the appropriate spot. .... .... Extended Pointers The elements <ptr> and <ref> can only be used for cross-references whose targets occur within the same XML document as their source. They can also refer only to XML elements. The elements discussed in this section are not restricted in these ways. <xptr> defines a pointer to another location in the current document or an external document. <xref> defines a pointer to another location in the current document or an external document, usually modified by additional text or comment. In addition to the attributes already discussed in section above, these elements share the following additional attribute, which is used to specify the target of the cross reference or link: url A Web URL specifying the destination The following example shows how to link to another page and web site See local information about email clients or go to The above example renders as follows: See local information about email clients or go to To link to a specific section on another page you should use the following syntax: faults, problems, or special requests Addresses The <address> element is used to mark a postal address of any kind. It contains one or more <addrLine> elements, one for each line of the address. address contains a postal or other address, for example of a publisher, an organization, or an individual. addrLine contains one line of a postal or other address. Here is a simple example: Oxford University Computing Services 13 Banbury Rd Oxford OX2 6NN Lists The various kinds of lists The element <list> is used to mark any kind of list. A list is a sequence of text items, which may be ordered, unordered, or a glossary list. Each item may be preceded by an item label (in a glossary list, this label is the term being defined): <list> contains any sequence of items organized as a list. Attributes include: type describes the form of the list. This attribute can have the following values: unordered (for lists with bullet-marked items) ordered (for lists with numbered or lettered items) gloss (for lists consisting of a set of technical terms, each marked with a <label> element and accompanied by a gloss or definition marked as an <item>) If the attribute is omitted, the default is for the list to be an unordered list. rend describes how the labels should appear. The rend attribute can have the following values: no-bullets (for producing unordered lists with no bullet points) lower-alpha (for producing ordered lists with labels a, b, c, ...) upper-alpha (for producing ordered lists with labels A, B, C, ...) lower-roman (for producing ordered lists with labels i, ii, iii, ...) upper-roman (for producing ordered lists with labels I, II, III, ...) If the attribute is omitted, the default is to produce the labels 1, 2, 3, ... (for ordered lists) or plain bullet points (for unordered lists). <item> contains one component of a list. <label> contains the label associated with an item in a list; in glossaries, marks the term being defined. Individual list items are tagged with <item>. The first <item> may optionally be preceded by a <head>, which gives a heading for the list. The numbering of a list may be omitted (if reconstructible), indicated using the n attribute on each item, or (rarely) tagged as content using the <label> element. In order to achieve the same result with different browsers, the value of n should be greater than 0. Examples of lists Example 1 An unordered list First item in list Second item in list Third item in list An unordered list First item in list Second item in list Third item in list Example 2 An ordered list First item in list Second item in list Third item in list An ordered list First item in list Second item in list Third item in list Example 3 An ordered list with controlled numbering First item in list Second item in list Third item in list An ordered list with controlled numbering First item in list Second item in list Third item in list Example 4 An ordered list with letters for labels First item in list Second item in list Third item in list An ordered list with letters for labels First item in list Second item in list Third item in list Example 5 An ordered list with controlled lettering First item in list Second item in list Third item in list An ordered list with controlled lettering First item in list Second item in list Third item in list Example 6 A glossary list One First item in list Two Second item in list Three Third item in list A glossary list One First item in list Two Second item in list Three Third item in list The styles should not be mixed in the same list. Example 7 A simple two-column table may be treated as a glossary list, tagged <list type=gloss>. Here, each item comprises a term and a gloss, marked with <label> and <item> respectively. Vocabulary nu now lhude loudly bloweth blooms med meadow wude wood awe ewe lhouth lows sterteth bounds, frisks verteth pedit murie merrily swik cease naver never The above is rendered as follows: Vocabulary nu now lhude loudly bloweth blooms med meadow wude wood awe ewe lhouth lows sterteth bounds, frisks verteth pedit murie merrily swik cease naver never Nested lists Lists of whatever kind can, of course, nest within list items to any depth required. Here, for example, a glossary list contains two items, each of which is itself a simple list: EVIL I am cast upon a horrible desolate island, void of all hope of recovery. I am singled out and separated as it were from all the world to be miserable. I am divided from mankind &#8212; a solitaire; one banished from human society. GOOD But I am alive; and not drowned, as all my ship's company were. But I am singled out, too, from all the ship's crew, to be spared from death... But I am not starved, and perishing on a barren place, affording no sustenances.... The above is rendered as follows: EVIL I am cast upon a horrible desolate island, void of all hope of recovery. I am singled out and separated as it were from all the world to be miserable. I am divided from mankind - a solitaire; one banished from human society. GOOD But I am alive; and not drowned, as all my ship's company were. But I am singled out, too, from all the ship's crew, to be spared from death... But I am not starved, and perishing on a barren place, affording no sustenances.... Tables The following elements are provided for describing tables: <table> contains text displayed in tabular form, in rows and columns. <row> contains one row of a table. Attributes include: role indicates the kind of information held in the cells of this row. This attribute should have the value label for labels or descriptive information, and data for actual data values. If omitted, it defaults to data. <cell> contains one cell of a table. Attributes include: role indicates the kind of information held in the cell. This attribute should have the value label for labels or descriptive information, and data for actual data values. If omitted, it defaults to data. cols indicates the number of columns occupied by this cell. If omitted, it defaults to 1. rows indicates the number of rows occupied by this cell. If omitted, it defaults to 1. The <table> element can also take the align, summary, width, border, frame, rules, cellspacing and cellpadding attributes defined in HTML, and the conversion to HTML will pass them straight through. Making your table accessible Caution is advised when using tables as it is very easy to make them inaccessible to users of alternative technologies e.g. screen readers. It is your responsibility to make sure that any table used is comprehensible when it is linearised and that it contains suitable accessibility attributes. Screen readers linearise tables when they are reading the content out to the user. This means that if you have failed to take this into account when designing your table, the screen reader user will not understand the content of your table. To check to see how your table will be read out, go to . Run your page containing the table through this online checker. It will show you how the table will be read to a screen reader user. All tables should be given the summary attribute regardless of whether they are for data or page layout. For data tables a short summary of the table content must be added for accessibility. Where a table is used for layout, the summary attribute is included, but left empty. Here is an example: table shows the rise and fall of mortality figures during the plague years 1 2 3 St. Leonard's, Shoreditch 64 84 119 St. Botolph's, Bishopsgate 65 105 116 St. Giles's, Cripplegate 213 421 554 The above is rendered as: table shows the rise and fall of mortality figures during the plague years 1 2 3 St. Leonard's, Shoreditch 64 84 119 St. Botolph's, Bishopsgate 65 105 116 St. Giles's, Cripplegate 213 421 554 Making your table sortable Normal use If a <table> element has a rend attribute with the value tablesorter, the table will be rendered with the cells of the first column sorted and with buttons on each column that enable the person viewing the page to sort the table on another column. ... Here is an example of what can be done: table shows a use of the tablesorter rend (derived from an example at http://tablesorter.com/docs/) First Name    Last Name    Age    Total    Discount    Difference    Date and time ISO UK 1 UK 2 Peter Parker 28 £9.99 20.9% +12.1 Sep 9, 2002 8:14 AM 2002-09-09 09-09-2002 09/09/2002 John Good 33 £19.99 125% +12 Jan 12, 2003 5:14 AM 2003-01-12 12-01-2003 12/01/2003 Clark Kent 18 £15.89 44% -26 Jan 18, 2001 11:14 AM 2001-01-18 18-01-2001 18/01/2001 Bruce Almighty 45 £153.19 44.7% +77 Sep 10, 2002 9:12 AM 2002-09-10 10-09-2002 10/09/2002 Bruce Evans 22 £13.19 11% -100.9 Sep 1, 2002 9:12 AM 2002-09-01 01-09-2002 01/09/2002 The above can be achieved using the following TEI: table shows a user of the tablesorter rend (derived from an example at http://tablesorter.com/docs/) First Name&#160;&#160;&#160; Last Name&#160;&#160;&#160; Age&#160;&#160;&#160; Total&#160;&#160;&#160; Discount&#160;&#160;&#160; Difference&#160;&#160;&#160; Date and time ISO UK 1 UK 2 Peter Parker 28 £9.99 20.9% +12.1 Sep 9, 2002 8:14 AM 2002-09-09 09-09-2002 09/09/2002 John Good 33 £19.99 125% +12 Jan 12, 2003 5:14 AM 2003-01-12 12-01-2003 12/01/2003 Clark Kent 18 £15.89 44% -26 Jan 18, 2001 11:14 AM 2001-01-18 18-01-2001 18/01/2001 Bruce Almighty 45 £153.19 44.7% +77 Sep 10, 2002 9:12 AM 2002-09-10 10-09-2002 10/09/2002 Bruce Evans 22 £13.19 11% -100.9 Sep 1, 2002 9:12 AM 2002-09-01 01-09-2002 01/09/2002 Customising tablesorter There are two ways in which the use of tablesorter can be customised. You will also find the documentation for tablesorter useful. Customising tablesorter: for specific tables This is appropriate if you want to do your own customisation of tablesorter for specific tables that occur in a TEI file. In the teiHeader of the TEI file, you provide JavaScript like the following: <html:script type="text/javascript"> var someOtherTextExtraction = function(node) { var anchortext = node.innerHTML.indexOf("--anchor--"); if ( anchortext == -1 ) { return node.innerHTML; } else { return node.innerHTML.substring(anchortext + 15); } } $(document).ready(function() { $table = $(".tablesorternoinitcode").tablesorter( {dateFormat: 'uk', sortList: [[0,0]], textExtraction: someOtherTextExtraction} ); } ); </html:script> And you alter the table to have the following rends: ... Gotcha: if you do provide a <html:script> element, remember to define the html namespace. For more details, see the section of this document labelled Using HTML elements in a TEI file. The above assumes you want to do the same initialisation code for each table. If you want different initialisation code for some of the tables, add another value to the rend attribute of each table: ... and refer to this value (rather than tablesorternoinitcode) in the initialisation code: $table = $(".tableone").tablesorter( The tablesorternoinitcode must still be present in the rend. It is being used to indicate that you do not want the XSL to generate the default initialisation code. Customising tablesorter: for all tables of a site This is appropriate if you want a micro site to have full control of the customisation of tablesorter. The file oucsstandard.xsl has the following definition for the template outputTableSorterInitCode. In the XSL for the micro site, you define a template that overrides this. <xsl:template name="outputTableSorterInitCode"> <script type="text/javascript"> var GTSTextExtraction = function(node) { var anchortext = node.innerHTML.indexOf("--anchor--"); if ( anchortext == -1 ) { return node.innerHTML; } else { return node.innerHTML.substring(anchortext + 15); } } $(document).ready(function() { $table = $(".tablesorter:not(.tablesorternoinitcode)").tablesorter( {dateFormat: 'uk', sortList: [[0,0]], textExtraction: GTSTextExtraction} ); } ); </script> <xsl:call-template name="outputLinebreak"/> </xsl:template> Figures and Graphics Not all the components of a document are necessarily textual. The most straight forward text will often contain diagrams or illustrations, to say nothing of documents in which image and text are inextricably intertwined, or electronic resources in which the two are complementary. This poses accessibility issues for users who cannot see the images. What are they? Are they important to the text, or just page decoration? Is the image a graph or simple picture? Has the author provided extra information about the graphic for those that cannot see it? If you do not provide alternative text for graphics or other accessibiity features in the page coding, the page will be inaccessible to some visitors. The following tags and attributes are used to add images to web pages: <figure> marks the spot at which a graphic is to be inserted in a document. Attributes include: url The location and file name of a graphic. width The width to which the graphic should be scaled. If omitted, it defaults to the width of the graphic. height The height to which the graphic should be scaled. If omitted, it defaults to the height of the graphic. scale The extent which the graphic should be scaled (eg 0.5). If omitted, it defaults to 1. <figDesc> contains a textual description of the appearance or content of a graphic, essential for accessible graphics. A picture is inserted into a document using the url attribute of the <figure> element: Mr Fezziwig's Ball A Cruikshank engraving showing Mr Fezziwig leading a group of revellers. Usually, a graphic will have at the least an identifying title, which should be encoded using the <head> element. Images which are given a head tag have this text automatically converted to a figure caption and are numbered sequentially throughout the document. It is also essential to include a brief description of the image using <figDesc>. If the image is difficult to describe in just a few words, you should provide an alternative page where a full account of the image can be given to the user: this extra information should be provided via a [d] link. These are normal url links to normal web pages. By convention the [d] link should be provided next to the image in question; users needing greater detail about a given image will click on the [d] link for more information. If the image is for decoration only (very rare on OUCS pages), it is still necessary to include the <figDesc> element in your document, but in this case it should be left blank. By convention the image is then considered just page decoration and unimportant to the reader. If you want to control the way text flows around an image, use a rend value, as described in the section. Getting a TEI file to display a newsfeed A newsfeed can be displayed by putting a <xptr> element with a rend of rss and a type of transclude inside a <p> element. The url attribute has the URL of the newsfeed. Our XSL can cope with newsfeeds written in RSS 2.0, RSS 1.0 and Atom 1.0. <p> <xptr rend="rss" type="transclude" url="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml" /> </p> This will produce output like the following:
Search for S Korea ferry passengersEmergency services continue to search overnight for almost 300 people unaccounted for after a ferry carrying 459 people sank off South Korea.
Blakelock family 'must feel angry'Nicholas Jacobs, the man cleared of killing PC Keith Blakelock in 1985, says he would feel "angry and disappointed" if he was a member of the police officer's family.
Ukraine military column 'disarmed'Ukraine's defence ministry says six of its armoured vehicles have been seized by pro-Russian militants, amid mounting tension in eastern Ukraine.
Two killed in M26 five-vehicle crashTwo people are killed - and seven others are taken to hospital - after a five-vehicle crash which closed the M26 in both directions.
First Heartbleed 'hacker' arrestedA 19-year-old Canadian citizen is charged with hacking into the Canada Revenue Agency's website, becoming the first arrest in relation to the Heartbleed security breach.
Virgin apologises for email glitchVirgin Media apologises after some of its customers received hundreds of unwanted emails because of a distribution list error.
Power cut hits north of ScotlandA severe power cut leaves large areas of northern Scotland without electricity, with almost 200,000 properties said to have been affected.
Coulson 'heard Blunkett voicemails'Ex-editor Andy Coulson reveals in court for the first time he did listen to private voicemail messages relating to former home secretary David Blunkett.
Iraqi murder claims a 'conspiracy'Allegations that 20 Iraqis were murdered by British troops in 2004 were the result of a "conspiracy" to pervert the course of justice, the UK claims.
Primary places revealed amid squeezeA teachers' leader says there is a growing crisis over places at primary schools as parents discover which their children will attend.
By default, 10 items of the feed will get output together with an RSS icon that allows people to subscribe to the newsfeed. Gotcha: the web page will not change when new items get added to the feed unless you arrange for your page not to be cached by AxKit. Please contact webmaster@oucs.ox.ac.uk to get this done. rsssummary gives a different style of output Other components can be added to the rend to control what gets output and how it gets output. A different style of output is delivered if you add rsssummary to the rend: <p> <xptr rend="rss rsssummary" type="transclude" url="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml" /> </p> This will produce output like the following:
Search for S Korea ferry passengersEmergency services continue to search overnight for almost 300 people unaccounted for after a ferry carrying 459 people sank off South Korea.
Blakelock family 'must feel angry'Nicholas Jacobs, the man cleared of killing PC Keith Blakelock in 1985, says he would feel "angry and disappointed" if he was a member of the police officer's family.
Ukraine military column 'disarmed'Ukraine's defence ministry says six of its armoured vehicles have been seized by pro-Russian militants, amid mounting tension in eastern Ukraine.
Two killed in M26 five-vehicle crashTwo people are killed - and seven others are taken to hospital - after a five-vehicle crash which closed the M26 in both directions.
First Heartbleed 'hacker' arrestedA 19-year-old Canadian citizen is charged with hacking into the Canada Revenue Agency's website, becoming the first arrest in relation to the Heartbleed security breach.
Virgin apologises for email glitchVirgin Media apologises after some of its customers received hundreds of unwanted emails because of a distribution list error.
Power cut hits north of ScotlandA severe power cut leaves large areas of northern Scotland without electricity, with almost 200,000 properties said to have been affected.
Coulson 'heard Blunkett voicemails'Ex-editor Andy Coulson reveals in court for the first time he did listen to private voicemail messages relating to former home secretary David Blunkett.
Iraqi murder claims a 'conspiracy'Allegations that 20 Iraqis were murdered by British troops in 2004 were the result of a "conspiracy" to pervert the course of justice, the UK claims.
Primary places revealed amid squeezeA teachers' leader says there is a growing crisis over places at primary schools as parents discover which their children will attend.
rsslimit-all outputs all items and rssnoimage omits the RSS icon Suppose you want all the items of the feed to be output but you do not want the RSS icon: <p> <xptr rend="rss rssnoimage rsslimit-all" type="transclude" url="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml" /> </p> This will produce output like the following:
Search for S Korea ferry passengersEmergency services continue to search overnight for almost 300 people unaccounted for after a ferry carrying 459 people sank off South Korea.
Blakelock family 'must feel angry'Nicholas Jacobs, the man cleared of killing PC Keith Blakelock in 1985, says he would feel "angry and disappointed" if he was a member of the police officer's family.
Ukraine military column 'disarmed'Ukraine's defence ministry says six of its armoured vehicles have been seized by pro-Russian militants, amid mounting tension in eastern Ukraine.
Two killed in M26 five-vehicle crashTwo people are killed - and seven others are taken to hospital - after a five-vehicle crash which closed the M26 in both directions.
First Heartbleed 'hacker' arrestedA 19-year-old Canadian citizen is charged with hacking into the Canada Revenue Agency's website, becoming the first arrest in relation to the Heartbleed security breach.
Virgin apologises for email glitchVirgin Media apologises after some of its customers received hundreds of unwanted emails because of a distribution list error.
Power cut hits north of ScotlandA severe power cut leaves large areas of northern Scotland without electricity, with almost 200,000 properties said to have been affected.
Coulson 'heard Blunkett voicemails'Ex-editor Andy Coulson reveals in court for the first time he did listen to private voicemail messages relating to former home secretary David Blunkett.
Iraqi murder claims a 'conspiracy'Allegations that 20 Iraqis were murdered by British troops in 2004 were the result of a "conspiracy" to pervert the course of justice, the UK claims.
Primary places revealed amid squeezeA teachers' leader says there is a growing crisis over places at primary schools as parents discover which their children will attend.
Marathon runner's family 'shocked'The family of a runner who died after completing the London Marathon thank the public for their support.
Brazil troops guard strike-hit BahiaBrazil sends thousands of federal troops to maintain order in the north-eastern state of Bahia after police there went on strike over pay.
Row erupts over removed Banksy workA row breaks out over the ownership of a work of art by "guerrilla artist" Banksy after it was taken from a Bristol street.
Beard trend 'guided by evolution'The boom and bust of men's beard fashions may mirror Darwinian selection, scientists say.
Manchester City 2-2 SunderlandManchester City drop points in the title race but they recover from a goal down to salvage a late draw with Sunderland.
Everton 2-3 Crystal PalaceEverton hand the initiative back to Arsenal in the race for fourth as they suffer a surprise 3-2 defeat to Crystal Palace.
Ebdon misses out on Crucible spotPeter Ebdon fails to qualify for the World Championship for the first time since turning professional.
The inside story of Lara's record 375How Brian Lara's world record innings against England in Antigua unfolded - from those who witnessed it first hand
Scott earns Arsenal point in openerAlex Scott's goal ensures FA Cup holders Arsenal opened their Women's Super League season with a 1-1 draw at Notts County.
Wage rises catch up with inflationAfter nearly six years of falling real wages, rises in weekly earnings have finally caught up with inflation, according to the Office for National Statistics.
VIDEO: Price war sees Tesco profits fall 6.9%Tesco has reported a 6.9% fall in group trading annual profit to £3.3bn as it continues to lose market share to discount rivals.
UK unemployment rate falls to 6.9%The number of people out of work in the UK has fallen by 77,000 to a five year low of 2.24 million in the three months to February, official figures indicate.
AUDIO: Farage: Expenses complaint 'outrageous'Nigel Farage reacts to a complaint about how he has used his "general expenditure allowance" from the EU.
Warning over bowel cancer screeningBowel cancer screening uptake needs to improve, campaigners say, after figures showed just half of people eligible in England come forward for the test.
VIDEO: Lord Tebbit turns children's writerLord Tebbit, the former Tory minister and party chairman turns his hand to writing a children's novel, the central character being a 14-year-old boy left paralysed after a car crash.
New teachers 'can't risk mortgages'A teaching union leader says young teachers are shying away from taking out mortgages because of uncertainty over their future earnings.
VIDEO: Ex-terror chief heads 'Trojan horse' probeAn inquiry into allegations of a hard-line Islamist plot to take over 25 Birmingham schools is to be lead by the Met's former national head of counter terrorism, it has been announced.
Galaxy S5 fingerprint sensor hackedGerman security researchers say that a spoof fingerprint can be used to unlock Samsung's new handset and steal money.
VIDEO: Will Jelly repeat Twitter's success?Biz Stone discusses his new social app Jelly which he hopes will encourage people to help each other out.
Birth of 'new Saturn moon' witnessedScientists say they have discovered what could be the birth of a new moon in the rings of Saturn.
VIDEO: How to pack a dinosaur for a moveHow to prep dinosaur remains for a 2,000 mile road trip
Paul Weller family win Mail damagesRock star Paul Weller wins £10,000 for his children after their pictures were "plastered" on the Mail Online.
AUDIO: Freeman: Reunion would 'ruin' OfficeMartin Freeman claims a reunion of The Office would risk "ruining" it.
What was the mysterious black ring in Leamington Spa?A video of a mysterious black ring in the sky over Leamington Spa has left people scratching their heads. Just what might it have been?
Should demolition of buildings be used as entertainment?Plans to demolish five tower blocks as part of the Glasgow Commonwealth Games opening ceremony have been scotched.
Man wins 'first open N Korean race'A runner from Stafford believes he has won the first North Korean half-marathon to be open to international amateur athletes.
Life for football coach murdererA teenager who murdered a football coach by stabbing him to death with a kitchen knife on a Leicester street is jailed for life.
Life term for 'monstrous' rapistA "monstrous" sex attacker who raped five women and sexually abused a sixth was given a lifelong restriction sentence.
Boy airlifted after being hit by vanA ten-year-old boy is airlifted to hospital after being knocked off his bike by a van on a country road in Aberdeenshire.
Court clears ex-Anglo bank bossThe former chairman of Anglo Irish bank has been found not guilty of illegally supporting the bank's share price, the jury continues to deliberate in the case against two others.
Care homes saved from closureFour residential care homes in Northern Ireland that were earmarked for closure have been told they will remain open.
Unemployment total falls by 6,000Unemployment has fallen in Wales by 6,000 to 102,000 in the last quarter and now stands at 6.8%, according to official figures.
Early op 'may have saved man's life'A businessman who died after complications following a cancer operation "would probably have survived" if he was re-operated on sooner, an inquest hears.
Reeva Steenkamp shot in 'rapid fire'A forensics expert contradicts police ballistics testimony by telling the trial of Oscar Pistorius that his girlfriend was shot in quick succession.
Remittance fees 'hurt Africans'Communities in sub-Saharan Africa are being "hurt" by high fees charged by money transfer operators, charity Comic Relief says.
Pakistan Taliban end ceasefireThe Pakistani Taliban say they will not extend a ceasefire with the government announced last month, but will remain committed to peace talks.
India to vote on biggest polling dayIndians are due to begin voting in the biggest day of the general election, pitting the ruling Congress party against the main opposition BJP.
EU Sentinel returns first imagesThe first images come back from the radar satellite launched as part of the European Union's new flagship Earth-observation project.
Head of oldest African park shotThe Belgian director of Africa's oldest national park - Virunga in the Democratic Republic of Congo - is shot and wounded in an ambush.
Venezuela rejects protest amnestyThe Venezuelan government says it will not grant jailed opposition leaders an amnesty at talks aimed at ending anti-government protests.
Mexico 'cartel city' mayor arrestedThe mayor of a city known as a stronghold of Mexico's Knights Templar drug cartel is arrested on suspicion of extorting money on the cartel's behalf.
Mid-East peace talks meeting delayedA meeting between Palestinian and Israeli peace negotiators has been postponed in the wake of a killing of an Israeli in the West Bank.
Saudi intelligence chief removedSaudi Arabia's intelligence chief, Prince Bandar bin Sultan, has been removed from his post "at his own request", state media report.
Bloomberg in $50m push for gun lawsFormer New York City Mayor Michael Bloomberg announces a $50m (£30m) election year push for stricter gun laws across the US.
North Dakota abortion ban overturnedA US federal judge overthrows a North Dakota law banning abortion after the foetus' heartbeat can be detected, as early as six weeks in some cases.
Day in pictures: 16 April 2014News photos from past 24 hours: 16 April
In pictures: South Korea ferry sinksPassenger ferry in South Korea capsizes
Your pictures: South AfricaReaders' photos on the theme of "South Africa"
In pictures: Chile fire rages onHuge fire in the Chilean city of Valparaiso
Day in pictures: 15 April 2014News photos from past 24 hours: 15 April
In pictures: Nigeria bus blastAftermath of a bomb blast in Abuja
In pictures: Royals tour New ZealandDuke and Duchess in New Zealand and Australia
Day in pictures: 14 April 2014News photos from past 24 hours: 14 April
Poverty 'scandal' and benefits 'outrage' - front pagesA charity's report that it handed out almost one million food parcels in the last year makes headlines, while the Daily Express questions one mother's use of the benefit system.
VIDEO: House of CommonsThe PM is challenged over his support for Maria Miller following a row over her expenses.
VIDEO: CCTV reveals dog as hunted car vandalA vandal responsible for puncturing more than two dozen vehicle tyres in a quiet Cumbrian village has been unmasked as a dog.
VIDEO: Bristol boy's club battle over BanksyA row has broken out over the ownership of a work of art by "guerrilla artist" Banksy after it was taken from a Bristol street
VIDEO: Hundreds missing as S Korea ferry sinksA major rescue operation is under way after a ferry carrying more than 470 people sank off the coast of South Korea.
VIDEO: Royal joke on baby prince's first wordThe Duke of Cambridge has described Australia as a "beacon of confidence" as he and his family began the next leg of their Antipodean tour.
VIDEO: Two killed in M26 five-vehicle crashA major motorway has been closed, after a crash involving a car and two lorries resulted in "multiple casualties".
VIDEO: UB40 gig 'made fan's ears bleed'UB40 has denied causing a fan's ears to bleed at a gig in Cambridge on Monday.
VIDEO: Pistorius trial day 23 - in 60 secsThe girlfriend of Oscar Pistorius was shot in quick succession as she fell down, a forensics expert has told the South African athlete's murder trial.
VIDEO: Killer shrimp added to EU blacklistThe European Parliament is to vote on a bill to draw up a blacklist of invasive alien species, such as killer shrimp.
On a hill, in sight of EuropeTrying to get into Europe from Morocco
Royals treated like celebrities in New ZealandHow New Zealand reacted to William, Kate - and George
BBC Two's disastrous launch nightWhy BBC Two's launch was not all right on the night
Iran execution stopped at last minuteThe public hanging stopped at the last minute
Sweet or sour? Duping our taste budsWould this dessert taste different on a black plate?
The spooky world of the 'numbers stations'What are the mysterious radio 'numbers stations'?
Carmichael promises more isles powerMore power to the Northern and Western Isles?
Exhuming remains at Florida schoolWho was buried behind a boys' school in Florida?
How 3D is changing the shape of lessonsHow 3D printing is changing the shape of lessons
VIDEO: The Spanish hamlet being given away for freeThe abandoned hamlet its mayor wants to give away
Tesco - jam tomorrow?Kamal Ahmed on another set of poor results from Tesco
Syria: Report shows how foreign fighters use social mediaReport shows how foreign fighters in Syria are using social media
rsslimit-2 outputs two items and rssbrief just outputs the titles Suppose you just want the titles and you only want two items output: <p> <xptr rend="rss rssbrief rsslimit-2" type="transclude" url="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml" /> </p> This will produce output like the following:
Search for S Korea ferry passengers
Blakelock family 'must feel angry'
jsdate-XXXX outputs the date the item was published If you also want the date when the item was published, you can use: <p> <xptr rend="jsdate-[d_F_Y] rss rssbrief rsslimit-2" type="transclude" url="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml" /> </p> Here the rend attribute has a component that starts with jsdate-. This is followed by some notation (e.g., [d_F_Y]) that indicates how you want the date formatted. It uses the same notation that is used by PHP for its date function with the addition of one character: a _ means generate a space. The date is output in a <span> that has a class of rssdate and the default CSS hides any such span. So you will also need to define some CSS to ensure the date is displayed: <html:style type="text/css"> .rssdate { display: inline; padding-left: 10px; } </html:style> This will produce output like the following:
Search for S Korea ferry passengers
Blakelock family 'must feel angry'
Here's another example. The TEI elements: <p> <xptr rend="rss rssnoimage rsslimit-2" type="transclude" url="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml" /> </p> will produce output like the following:
Search for S Korea ferry passengersEmergency services continue to search overnight for almost 300 people unaccounted for after a ferry carrying 459 people sank off South Korea.
Blakelock family 'must feel angry'Nicholas Jacobs, the man cleared of killing PC Keith Blakelock in 1985, says he would feel "angry and disappointed" if he was a member of the police officer's family.
Using HTML elements in a TEI file Although TEI is a rich language so that most of what can be coded in HTML can also be coded in TEI, there are occasions when you may want to use some HTML in a TEI document. If you wish to do this, you need to introduce a namespace that you can use to say that a particular element belongs to HTML rather than to TEI. Usually, the name html is used for this namespace. Somewhere you have to indicate which name you are using. Usually, this is done by replacing the first line of the file: <TEI.2> by: <TEI.2 xmlns:html="http://www.w3.org/1999/xhtml"> You can then use an HTML element (e.g., the <style> element) by prefixing its name with the namespace html: <html:style type="text/css"> .overdue: { background-color: red; } </html:style> Here is another example: <html:script type="text/javascript"> var GCS_due_date = ""; ... </html:script> If you want some HTML elements to appear in the <head> element of the HTML that gets generated, you should put these elements between the <fileDesc> and the <revisionDesc> elements (that appear in the <teiHeader>). Suppose you do wish to add an HTML <style> element. The rules of HTML say the <style> element must finish up in the <head> element of the resulting HTML. So to achieve this, use something like: ... </fileDesc> <html:style type="text/css"> .overdue: { background-color: red; } </html:style> <revisionDesc> ... Forms to collect data and send a message It is possible to provide a form (in a TEI file) that collects some data from a user and sends that data to someone in an e-mail message. There are details about this in a document on FormMail. Accessibility of documentation Accessibility of our documentation is paramount to ensure documents are accessible to all readers and for OUCS to stay on the correct side of the law. It is necessary for all OUCS authors to familiarise themselves with the ways and means to make their documents as accessible as possible. Authors need to make sure that they follow the following guidelines: do not make links with the text here or click here, make links that mean something out of context of the sentence they are in. Similarly do not use the same titles for lots of different links on a page when they actually point to different places. When using graphics always provide the <figDesc> element. If necessary go the extra step and make a [d] link for longer explanations of figures When using tables, make sure they are comprehensible when they are linearised. Always include the summary attribute regardless of whether the table is for layout or data. The latter requires you to give some details of the table's content. When you have finished making a web page, you can check its accessibility using online services such as those found in the Complete List of Web Accessibility Evaluation Tools (compiled by the Web Accessibility Initiative (WAI)). Please use these checkers and make any changes required. Specialised Features Generated Divisions Most modern document production systems have the ability to automatically generate whole sections such as a table of contents or an index. The TEI OUCS scheme provides an element to mark the location at which such a generated section should be placed. <divGen> indicates the location at which a textual division generated automatically by a text-processing application is to appear. Attributes include: type specifies what type of generated text division (e.g. index, table of contents, etc.) is to appear. Sample values include: index (an index is to be generated and inserted at this point), toc (a table of contents), figlist (a list of figures) and tablist (a list of tables). The <divGen> element can be placed anywhere that a division element would be legal, as in the following example: ... Preface ... ... Appendix ... When an index or table of contents is to be encoded (rather than one being generated) for some reason, the <list> element discussed in section should be used. Rends Rend values can be used to define how an element is rendered on the webpage, for example aligning items to the left or right of a page, allowing text to flow around images or stating that a bit of text should be in italics or red. Some of the more common rends available for use with the OUCS webpages are listed below. If there is a particular style you need on your pages that is not currently available, please contact webmaster@oucs.ox.ac.uk for help. Rends for use with images: <figure rend="xxx"> border places a border around the image. centre places then image in the middle of the line. Text breaks and runs above and below. inline image appears with the text on either side. Spacing for the line is decided by image height (which means there is space above the text if the image is higher than the text row) pic-leftfloats image to the left in your running text. Text does not break for image but continues to the right of (and under) it. pic-rightfloats image to the right in your running text. Text does not break for image but continues to the left of (and under) it. spaceimageadds space around an image. Text runs above and below image+ space. wrapimage aligns to the left. Text breaks and continues to the right of image Rends for use with tables: <table rend="xxx">, <row rend="xxx">, <cell rend="xxx"> label used for cell or row to show they contain labels rather than data. Note: <row rend=”label”> makes the background light blue whereas <row role=”label"> makes the background grey and the text white and centred centretext to make text in a row centred in each cell greenused for cell to add background colour redused for cell to add background colour yellowused for cell to add background colour blueused for cell to add background colour Rends for use with lists: <list rend="xxx"> lower-alpha for ordered list. List items numbered a, b, c etc lower-romanfor ordered list. List items numbered i, ii, iii etc upper-alphafor ordered list. List items numbered A, B, C etc upper-roman for ordered list. List items numbered I, II, III, IV etc no-bullets List items appear without bullets before them Rends for use with a block of text: <p rend="xxx"> or <div rend="xxx> centrecentres text centretext centres text importanttext is bold, red wrapUsed to wrap text around images greengreen text redred text Rends to use with highlighted text: <hi rend="xxx"> bold makes text bold italic makes text italic small makes text smaller in size sup makes text appear as superscript sub makes text appear as subscript important makes text red and bold code makes text appear in bold courier font red makes text red green makes text green Other rends nosplit Unusually this is only applied to the TEI.2 element. Used to prevent your document from spliting on the major divs when it is displayed on the web. Very useful if you have lots of small divs that would look odd on their own pages. new Used on links when you want the link to open a new window. Special Characters Some characters must be treated specially, using character entities: Entity Character Description &amp; & ampersand &quot; " double quotation mark &lt; < less-than sign &gt; > greater-than sign &apos; ' apostrophe Any other characters which are not on your keyboard can either be entered as numeric entities (see, eg, ) or using UTF-8. How you enter UTF-8 on your keyboard depends on your application or operating system. oXygen, for example, has a facility Edit/Enter from Character Map to let you enter characters which are not on the keyboard.