Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Text Encoding Initiative
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==TEI guidelines== The ''TEI Guidelines'' collectively define a type of [[XML]] format, and are the defining output of the community of practice. The format differs from other well-known [[open formats]] for text (such as [[HTML]] and [[OpenDocument]]) in that it is primarily semantic rather than presentational: the semantics and interpretation of every tag and attribute are specified. There are some 500 different textual components and concepts: {{mono|word}},<ref name="auto">{{Cite web|url=https://tei-c.org/release/doc/tei-p5-doc/en/html/ref-w.html|title=TEI element w (word)|website=tei-c.org}}</ref> {{mono|sentence}},<ref>{{Cite web|url=https://tei-c.org/release/doc/tei-p5-doc/en/html/ref-s.html|title=TEI element s (s-unit)|website=tei-c.org}}</ref> {{mono|character}},<ref>{{Cite web|url=https://tei-c.org/release/doc/tei-p5-doc/en/html/ref-c.html|title=TEI element c (character)|website=tei-c.org}}</ref> {{mono|glyph}},<ref>{{Cite web|url=https://tei-c.org/release/doc/tei-p5-doc/en/html/ref-g.html|title=TEI element g (character or glyph)|website=tei-c.org}}</ref> {{mono|person}},<ref>{{Cite web|url=https://tei-c.org/release/doc/tei-p5-doc/en/html/ref-person.html|title=TEI element person (person)|website=tei-c.org}}</ref> etc. Each is grounded in one or more academic disciplines and examples are given. ===Technical details=== The standard is split into two parts, a discursive textual description with extended examples and discussion and set of tag-by-tag definitions. Schemata in most of the modern formats ([[Document Type Definition|DTD]], [[RELAX NG]] and [[XML Schema (W3C)]]) are generated automatically from the tag-by-tag definitions. A number of tools support the production of the guidelines and the application of the guidelines to specific projects. A number of special tags are used to circumvent restrictions imposed by the underlying [[Unicode]]; {{mono|glyph}} to allow representation of characters that do not qualify for Unicode inclusion<ref name="auto"/>{{Failed verification|date=March 2025 |reason=This probably wants to be, instead of a reference to the page for word, the g or glyph pages, or perhaps https://tei-c.org/release/doc/tei-p5-doc/en/html/WD.html ; but in none of these places is this exact rationale for 𝚐𝚕𝚢𝚙𝚑 given, anyway. If anything, the page just linked suggests that you 𝘴𝘩𝘰𝘶𝘭𝘥 submit your new characters to Unicode for inclusion!}} and {{mono|choice}} to allow overcome the required strict linearity.<ref>{{cite web|url=http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-choice.html|title=Element choice|website=www.tei-c.org}}</ref> Most users of the format do not use the complete range of tags, but produce a customisation using a project-specific subset of the tags and attributes defined by the Guidelines. The TEI defines a sophisticated customization mechanism known as ODD for this purpose. In addition to documenting and describing each TEI tag, an ODD specification specifies its content model and other usage constraints, which may be expressed using [[schematron]]. ''TEI Lite'' is an example of such a customization. It defines an XML-based [[file format]] for exchanging texts. It is a manageable selection from the extensive set of elements available in the full TEI Guidelines. As an XML-based format, TEI cannot directly deal with [[overlapping markup]] and non-hierarchical structures. A variety of options to represent this sort of data is suggested by the guidelines.<ref>{{cite web |url= https://tei-c.org/release/doc/tei-p5-doc/en/html/NH.html |title=20 Non-hierarchical Structures - TEI P5: — Guidelines for Electronic Text Encoding and Interchange |work=tei-c.org |year=2019 |access-date=19 March 2019}}</ref> ===Examples=== The text of the TEI guidelines is rich in examples. There is also a samples page on the TEI wiki,<ref>{{cite web |url= http://wiki.tei-c.org/index.php/Samples_of_TEI_texts |title=Samples of TEI texts |work=wiki.tei-c.org |year=2011 |access-date=17 April 2012}}</ref> which gives examples of real-world projects that expose their underlying TEI. ====Prose tags==== TEI allows texts to be marked up syntactically at any level of granularity, or mixture of granularities. For example, this paragraph (p) has been marked up into sentences (s) and clauses (cl).<ref>{{cite web |url= http://www.tei-c.org/release/doc/tei-p5-doc/en/html/AI.html#AILCW |title=17 Simple Analytic Mechanisms - TEI P5: — Guidelines for Electronic Text Encoding and Interchange |work=tei-c.org |year=2012 |access-date=15 April 2012}}</ref> <syntaxhighlight lang="XML"> <s> <cl>It was about the beginning of September, 1664, <cl>that I, among the rest of my neighbours, heard in ordinary discourse <cl>that the plague was returned again to Holland; </cl> </cl> </cl> <cl>for it had been very violent there, and particularly at Amsterdam and Rotterdam, in the year 1663, </cl> <cl>whither, <cl>they say,</cl> it was brought, <cl>some said</cl> from Italy, others from the Levant, among some goods <cl>which were brought home by their Turkey fleet;</cl> </cl> <cl>others said it was brought from Candia; others from Cyprus. </cl> </s> <s> <cl>It mattered not <cl>from whence it came;</cl> </cl> <cl>but all agreed <cl>it was come into Holland again.</cl> </cl> </s> </syntaxhighlight> ====Verse==== TEI has tags for marking up verse. This example (taken from the French translation of the TEI Guidelines) shows a sonnet.<ref>{{cite web |url=http://www.tei-c.org/release/doc/tei-p5-doc/fr/html/ref-lg |title=TEI element lg (groupe de vers) |work=tei-c.org |year=2012 |access-date=15 April 2012 |archive-date=6 June 2012 |archive-url=https://web.archive.org/web/20120606011418/http://www.tei-c.org/release/doc/tei-p5-doc/fr/html/ref-lg |url-status=dead }}</ref> <syntaxhighlight lang="XML"> <div type="sonnet"> <lg type="quatrain"> <l>Les amoureux fervents et les savants austères</l> <l> Aiment également, dans leur mûre saison,</l> <l> Les chats puissants et doux, orgueil de la maison,</l> <l> Qui comme eux sont frileux et comme eux sédentaires.</l> </lg> <lg type="quatrain"> <l>Amis de la science et de la volupté</l> <l> Ils cherchent le silence et l'horreur des ténèbres ;</l> <l> L'Érèbe les eût pris pour ses coursiers funèbres,</l> <l> S'ils pouvaient au servage incliner leur fierté.</l> </lg> <lg type="tercet"> <l>Ils prennent en songeant les nobles attitudes</l> <l>Des grands sphinx allongés au fond des solitudes,</l> <l>Qui semblent s'endormir dans un rêve sans fin ;</l> </lg> <lg type="tercet"> <l>Leurs reins féconds sont pleins d'étincelles magiques,</l> <l> Et des parcelles d'or, ainsi qu'un sable fin,</l> <l>Étoilent vaguement leurs prunelles mystiques.</l> </lg> </div> </syntaxhighlight> ====Choice tag==== The {{mono|choice}} tag is used to represent sections of text that might be encoded or tagged in more than one possible way. In the following example, based on one in the standard, {{mono|choice}} is used twice, once to indicate an original and a corrected number, and once to indicate an original and regularised spelling.<ref>{{cite web |url= http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-choice.html |title=TEI element choice |work=tei-c.org |year=2012 |access-date=15 April 2012}}</ref> <syntaxhighlight lang="XML"> <p xml:id="p23">Lastly, That, upon his solemn oath to observe all the above articles, the said man-mountain shall have a daily allowance of meat and drink sufficient for the support of <choice> <sic>1724</sic> <corr>1728</corr> </choice> of our subjects, with free access to our royal person, and other marks of our <choice> <orig>favour</orig> <reg>favor</reg> </choice>. </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)