Changes

Jump to navigation Jump to search
662 bytes added ,  15:02, 5 August 2017
m
addrress of TEI by example modified
== General ==
TEI (Text Encoding Initiative) is "a consortium which collectively develops and maintains a standard for the representation of texts in digital form," to quote [http://www.tei-c.org/index.xml their own website]. They have developed a series of guidelines for editing texts in a digital form. In their latest form (which is called P 5), these guidelines weigh in at a hefty 1350 pages (OK, that's counting the bibliography and the index too; there are only 1290 pages of real text). These describe an xml format which is suitable for editing texts. The TEI guidelines have the advantage of being very well documented. There are a number of free resources available that should help everyone who is interested in getting started (one extremely helpful website with lots of tutorials, examples, and tests is [http://tbeteibyexample.kantl.be/TBE org TEI by example]). They are not (and do not aspire to be) an absolute standard that everyone has to follow, but many academic projects use these guidelines, and they should be a pretty good way to make sure that your electronic edition of a text will be useful in the future.
Since editing texts is something which quite a few users of ConTeXt are involved in, it makes sense to think about ways in which xml documents which follow the TEI guidelines can be typeset with ConTeXt. We would invite users to keep a few caveats in mind:
[[User:Thomas|Thomas]] 21:38, 7 November 2010 (UTC)
== Removing unwanted strings from xml source ==
 
In some cases you might want to remove strings or characters from the xml source. For example ConTeXt cannot process a hashmark. The following example shows how to remove the hashmark from a xml identifier before processing with the command \cldcontext
 
The xml source:
 
<xmlcode>
<a href="#myspecialid">the previous section</a>
</xmlcode>
 
The setup code:
 
<texcode>
\startxmlsetups xml:initialize
\xmlsetsetup{#1}{a}{xml:*}
\stopxmlsetups
 
\xmlregistersetup{xml:initialize}
 
\startxmlsetups xml:a
\cldcontext{string.sub([[\xmlatt{#1}{href}]],2)}
\stopxmlsetups
</texcode>
 
{{Getting started navbox}}
[[Category:XML]]
48

edits

Navigation menu