TEI Lex-0

— A baseline encoding for lexicographic data

13. Frequently Asked Questions

13.1. How do I start using TEI Lex-0 in my project?

To start using TEI Lex-0 in your own dictionary project, you need to set up your favorite XML editor to validate your dictionary against the TEI Lex-0 schema. This, you can do:

  • in oXygen XML Editor, by associating an existing TEI document with the TEI Lex-0 schema's url: https://raw.githubusercontent.com/DARIAH-ERIC/lexicalresources/master/Schemas/TEILex0/out/TEILex0.rng using either menubar actions (Document > Schema > Associate Schema) or the red-pin icon in the oXygen menu bar. Both of these methods will display the Associate Schema dialog box:
    Figure 2: Associating schema in oXygen XML Editor
  • manually by including the following xml processing instructions at the top of your TEI file:
      
      <?xml version="1.0" encoding="UTF-8"?> 
      <?xml-model href="https://raw.githubusercontent.com/DARIAH-ERIC/lexicalresources/master/Schemas/TEILex0/out/TEILex0.rng" 
          type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
      <?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" 
          type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
      <TEI xmlns="http://www.tei-c.org/ns/1.0">
      <!--etc.--> 
      </TEI>
      
  • by downloading the schema file from https://raw.githubusercontent.com/DARIAH-ERIC/lexicalresources/master/Schemas/TEILex0/out/TEILex0.rng and associating your xml file with it, using either of the above mentioned methods (see Figure 1).

Once you associate your dictionary file with the TEI Lex-0 schema, you can use your XML editor to validate it.

13.2. What should I do if I don't know how to encode something in TEI Lex-0?

TEI Lex-0 is a community-based project. If you have a question or need help encoding lexicographic data using TEI Lex-0, get in touch using our issue tracker here on GitHub.

13.3. How can I contribute to the development of TEI Lex-0?

More advanced users can propose solutions by submitting pull requests. Make sure you understand the internal nitty-gritty as well as our GitHub workflow.

13.3.1. The internal nitty-gritty

  • TEILex0.odd is an index file: it uses a bunch of <xi:include> pointers to individual "chapters" which live in TEILex0.parts
  • examples of dictionary entries encoded in TEI Lex-0 live in a file called examples.xml inside the folder TEILex0.examples
  • examples.xml validates against the TEI Lex-0 schema compiled in out/TEILex0.rng
  • stylesheets/tei-stripper.xsl is used to strip the TEI examples file of the TEI namespace, replacing it with "http://www.tei-c.org/ns/Examples" so that they can be used directly inside <egXML> in our ODD file. For more info about why this is necessary, see https://github.com/BCDH/tei-strip-and-include.
  • to include validated examples, you can either point to the id of the element you want to include using the xpointer() scheme like this:
       
      <egXML xmlns="http://www.tei-c.org/ns/Examples"> 
        <xi:include href="../examples/examples.stripped.xml" 
            corresp="../examples/examples.xml" xpointer="pflaume"/>
      </egXML> 
                      
    or, using the element() scheme, you can also include segments:
       
      <egXML xmlns="http://www.tei-c.org/ns/Examples"> 
        <xi:include href="../examples/examples.stripped.xml"
            corresp="../examples/examples.xml"
            xpointer="element(MZ.RGJS.сејче/4/1)"/> 
      </egXML> 
  • If you are using oXygen XML, clicking on the link in Author Mode will take you directly to the element or fragment in the examples.xml for editing XML.
    Figure 3: testing captions
  • After making any changes to examples.xml, use the tei-stripper.xsl (or the include TEI Stripper transformation scenario in oXygen) to produce examples.stripped.xml. Without this step, the examples in your ODD file will not validate.

13.3.2. GitHub Workflow

Before submitting your proposal to change something in the TEI Lex-0 specification or the narrative guidelines, make sure:

  • you have received some feedback from the community using our GitHub issues
  • you understand the internal nitty-gritty of how the TEI Lex-0 source files are organized and how the guidelines and the RNG schema is generated from ODD

To implement changes, make sure to follow our GitHub forklow:

  • if you're starting for the first time, fork the lexical-resources repository; then clone your fork on your machine; the cloned fork is your so-called working copy; the original repository from which you made your clone is called "upstream"
  • if you've forked and cloned the lexical-resources repository before, make sure the master branch in your working copy is up-to-date by fetching the latest changes and merging them into your working master branch from the upstream master
  • create a new branch off your master branch; name it appropriately (e.g. fix-attr-values-on-sense)
  • do the work (changing the specification, adding examples, or changing the narrative sections) in the specific branch you created for this particular issue
  • commit and push your changes
  • once you've finished implementing all the changes needed, create a pull-request
  • if editors ask you to make additional changes, keep working in the same branch (i.e. fix-attr-values-on-sense); commit and push; your changes will be automatically added to your pull request
  • once the editors accept your pull request, you can safely delete the branch from which you created your pull request (i.e. fix.attr-values-on-sense)
  • once your pull request has been merged into the upstream master branch by the editors, you can bring the master branch in your working copy up to date by fetching and merging changes from upstream master; then pushing them to your remote repo

13.4. How can I convert dictionaries from TEI Lex-0 to Ontolex-Lemon?

Funny you should ask, because we have exactly what you're looking for. Check out the tei2ontolex stylesheet.