wiki:schema

Version 12 (modified by jwillenborg, 14 years ago) (diff)

--

Schema support

The MPDL document storing and querying system supports the document schemas Archimedes and Echo. In the near future also a subset of TEI-Lite and for URI's a subset of XPointer will be supported.

The element "pb" (page break) and "s" (sentence) are supported especially: a special fast method is used to retrieve a certain page (the fragment between two "pb" elements) in a document. And all fulltext queries within documents are executed against the element "s" and result in hits which each contains the position in the document (page number and sentence number).

Archimedes

Schema

The Archimedes schema is developed by the Archimedes project and could be found here.

Example

In the following simple example the metadata part consists of 4 elements („author“, „title“, „lang“, „date“) and the text part consists of 2 pages („pb“) with 2 paragraphs („p“) which contains 3 sentences („s“).

<?xml version="1.0" encoding="UTF-8"?>
<archimedes xmlns:xlink="http://www.w3.org/1999/xlink">
  <info>
    <author>Name, Prename</author>
    <title>Title</title>
    <lang>en</lang>
    <date>1789</date>
  </info>
  <text>
    <body>
      <pb xlink:href="0001.jpg"/>
      <p>
        <s>This is the first sentence of the first paragraph.</s>
        <s>This is the second sentence of the first paragraph.</s>
        <s>This is the third sentence of the first paragraph.</s>
      </p>
      <p>
        <s>This is the first sentence of the second paragraph.</s>
        <s>This is the second sentence of the second paragraph.</s>
        <s>This is the third sentence of the second paragraph.</s>
      </p>
      <pb xlink:href="0002.jpg"/>
      <p>
        <s>This is the first sentence of the first paragraph with line <lb/>break.</s><lb/>
        <s>This is the second sentence of the first paragraph with line <lb/>break.</s><lb/>
        <s>This is the third sentence of the first paragraph with line <lb/>break.</s><lb/>
      </p>
      <p>
        <s>This is the first sentence of the second paragraph.</s>
        <s>This is the second sentence of the second paragraph.</s>
        <s>This is the third sentence of the second paragraph.</s>
      </p>
    </body>
  </text>
</archimedes>

Echo

Schema

The MPDL Echo schema is developed by the schema group of this project and could be found here.

Elements

An Echo document (element „echo“ with namespace „echo“) consists of a metadata part (element „metadata“) which contains the Dublin Core metadata of the document and a fulltext part (element „text“) which contains the content of the document.

Dublin Core metadata elements (namespace dcterms):

  • identifier
  • creator
  • title
  • date
  • rights
  • license
  • accessRights

Fulltext elements (with attributes in paranthesis):

  • text flow elements: head, div (type, level, style), p (style), lb, cb, gap (extent)
  • text structure elements: pb (file), s
  • figure elements: figure, image (file), caption (style), description (style), variables (style), handwritten (xlink:href)
  • note elements: note (xlink:label)
  • quotation elements: q, quote, blockquote, set-off
  • translation elements: foreign (lang, xml:lang), reg (orig)
  • mathematical elements: var (type), num, mml:*
  • geographical elements: place, event, time
  • person elements: person
  • xhtml elements: xhtml:* : e.g. table, ul
  • other elements: expan, emph (class), ref (target), anchor (type, xlink:label, xlink:href)

Example

In the following simple example the metadata part consists of 4 Dublin Core elements („creator“, „title“, „language“, „date“) and the text part consists of 2 pages („pb“) with 2 paragraphs („p“) which contains 3 sentences („s“).

<?xml version="1.0" encoding="UTF-8"?>
<echo xmlns="http://www.mpiwg-berlin.mpg.de/ns/echo/1.0/" xmlns:dcterms="http://purl.org/dc/terms">
  <metadata>
    <dcterms:creator>Name, Prename</dcterms:creator>
    <dcterms:title>Title</dcterms:title>
    <dcterms:language>en</dcterms:language>
    <dcterms:date>1789</dcterms:date>
  </metadata>
  <text>
    <pb file="0001"/>
    <p>
      <s>This is the first sentence of the first paragraph.</s>
      <s>This is the second sentence of the first paragraph.</s>
      <s>This is the third sentence of the first paragraph.</s>
    </p>
    <p>
      <s>This is the first sentence of the second paragraph.</s>
      <s>This is the second sentence of the second paragraph.</s>
      <s>This is the third sentence of the second paragraph.</s>
    </p>
    <pb file="0002"/>
    <p>
      <s>This is the first sentence of the first paragraph with line <lb/>break.</s><lb/>
      <s>This is the second sentence of the first paragraph with line <lb/>break.</s><lb/>
      <s>This is the third sentence of the first paragraph with line <lb/>break.</s><lb/>
    </p>
    <p>
      <s>This is the first sentence of the second paragraph.</s>
      <s>This is the second sentence of the second paragraph.</s>
      <s>This is the third sentence of the second paragraph.</s>
    </p>
  </text>
</echo>

TEI Lite

A subset of TEI-Lite will be supported in the near future.

Schema

The TEI Lite schema is developed by the Text Encoding Initiative and could be found here.

A description of TEI pointers and links could be found here.

Elements

A TEI document (element „TEI“ with namespace „TEI“) consists of a metadata part (element „teiHeader“) which contains the metadata of the document and a fulltext part (element „text“) which contains the content of the document.

The following list is only a first draft and will be finalized in the near future.

Metadata elements:

  • fileDesc, titleStmt, author, name, title, publicationStmt, date
  • profileDesc, langUsage, language
  • ...

Fulltext elements (with attributes in paranthesis):

  • text flow elements: head, div, seg, p, lb, lg, gap (extent)
  • text structure elements: pb (facs), s
  • figure elements: figure
  • note elements: note
  • quotation elements: q, quote
  • translation elements: foreign (lang, xml:lang), reg
  • mathematical elements: num, mml:*
  • time elements: date
  • xhtml elements: xhtml:* : e.g. table, ul
  • other elements: expan, emph, ref (target), anchor (xml:id)
  • ...

Example

In the following simple example the metadata part (teiHeader) consists of 4 elements („author“, „title“, „language“, „date“) and the text part consists of 2 pages („pb“) with 2 paragraphs („p“) which contains 3 sentences („s“).

<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <author>Name, Prename</author>
        <title>Title</title>
      </titleStmt>
      <publicationStmt>
        <date>1789</date>
      </publicationStmt>
    </fileDesc>
    <profileDesc>
      <langUsage>
        <language ident="en">English</language>
      </langUsage>
    </profileDesc>
  </teiHeader>
  <text>
    <body>
      <pb facs="0001.jpg"/>
      <p>
        <s>This is the first sentence of the first paragraph.</s>
        <s>This is the second sentence of the first paragraph.</s>
        <s>This is the third sentence of the first paragraph.</s>
      </p>
      <p>
        <s>This is the first sentence of the second paragraph.</s>
        <s>This is the second sentence of the second paragraph.</s>
        <s>This is the third sentence of the second paragraph.</s>
      </p>
      <pb facs="0002.jpg"/>
      <p>
        <s>This is the first sentence of the first paragraph with line <lb/>break.</s><lb/>
        <s>This is the second sentence of the first paragraph with line <lb/>break.</s><lb/>
        <s>This is the third sentence of the first paragraph with line <lb/>break.</s><lb/>
      </p>
      <p>
        <s>This is the first sentence of the second paragraph.</s>
        <s>This is the second sentence of the second paragraph.</s>
        <s>This is the third sentence of the second paragraph.</s>
      </p>
    </body>
  </text>
</TEI>