<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="tei_odds.rng" type="xml"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xml:lang="en">
 <teiHeader>
  <fileDesc>
   <titleStmt>
    <title>Customization of TEI schema for NKJP (segmentation level), version 0.6.2</title>
    <author>Piotr Bański and Adam Przepiórkowski</author>
   </titleStmt>
   <publicationStmt>
    <availability status="restricted">
     <p>This template file is not freely available until it gets released in the (pre)final form.</p>
    </availability>
   </publicationStmt>
   <sourceDesc>
    <p>Based on "TEI for Corpora" by Sebastian Rahtz</p>
   </sourceDesc>
  </fileDesc>
 </teiHeader>

 <text>
  <body>
   <head>NKJP Corpus -- schema for the segmentation layer</head>
   <p>This is the schema for the segmentation layer of the NKJP corpus (http://www.nkjp.pl/).</p>
   <list type="glossed" n="changelog">
    <item><label>Version 0.1</label> removed all linking elements except for <gi>ab</gi> and <gi>seg</gi></item>
    <item>
     <label>Version 0.2</label>
     <list type="bulleted">
      <item><gi>ab</gi> goes, <gi>p</gi> will be used in its place.</item>
      <item>Added <gi>s</gi> from the analysis module.</item>
      <item>Added element <gi>paren</gi>, as model.choicePart, with the content of <code>seg+</code>, which should
       actually be verified (todo)</item>
      <item>Added 2 attributes to att.segLike: <att>nkjp:nps</att> and <att>nkjp:bad</att></item>
      <item>Set the <att>type</att> attribute of <gi>seg</gi> to <val>token</val> as the default for this layer of
       annotation.</item>
     </list>
    </item>
    <item><label>Version 0.3</label>: <list type="bulleted">
      <item>added the definition for the <gi>xi:include</gi> element (from tei_include odd; removed some attr
       definitions, added it to model.segLike)</item>
      <item>added XLink attributes to <gi>p</gi></item>
      <item>Removed the "corpus" and "namesdates" modules.</item>
      <item>Removed <gi>typeNote</gi> from the header module.</item>
      <item>Restricted the root to <gi>teiCorpus</gi>.</item>
     </list>
    </item>
    <item>
     <label>Version 0.4, 22 May 2009</label>
     <list type="bulleted">
      <item>Modified the header: <gi>category</gi> can now contain a sequence of <gi>catDesc</gi>, rather than
       just a single instance of it.</item>
      <item>Added modules "corpus" and "namesdates", for <gi>particDesc</gi> and <gi>listPerson</gi>.</item>
     </list>
    </item>
    <item>
     <label>Version 0.5, 08 July 2009</label>
     <list type="bulleted">
      <item>AP: Added the required attribute <att>nkjp:file</att> to the header element <gi>extent</gi>.</item>
      <item>AP: Added the <att>nkjp:subcorpus</att> attribute.</item>
     </list>
    </item>
    <item>
     <label>Version 0.5.1, 25 July 2009</label>
     <list type="bulleted">
      <item>AP: Changed <att>nkjp:bad</att> to <att>nkjp:rejected</att>.</item>
     </list>
    </item>
    <item>
     <label>Version 0.5.2, 28 July 2009</label>
     <list type="bulleted">
      <item>AP: General clean-up, changing order of element specifications so that ediff with other levels easier.</item>
      <item>AP: Added the "spoken" module for <gi>recordingStmt</gi>.</item>
      <item>AP: Added <gi>nkjp:topic</gi> to the header.</item>
      <item>AP: Undeleted <gi>ab</gi> in module "linking".</item>
     </list>
    </item>
    <item>
     <label>Version 0.5.3, 29 July 2009</label>
     <list type="bulleted">
      <item>AP: Removed <att>xlink:href</att>, as TEI's own <att>corresp</att> may be used for the same purpose.</item>
     </list>
    </item>
    <item>
     <label>Version 0.6, 01 August 2009</label>
     <list type="bulleted">
      <item>AP: Introduced <gi>nkjp:fsLib</gi> which may contain <gi>fLib</gi> and <gi>fvLib</gi>. Solution adapted from tei_jos.xml (Tomaž Erjavec's "JOS 100k A" corpus).</item>
      <item>AP: In connection with the above, introduced the iso-fs module.</item>
      <item>AP: Added module tagdocs, so that <gi>gi</gi>, <gi>att</gi>, etc., may be used in headers.</item>
     </list>
    </item>
    <item>
     <label>Version 0.6.1, 23 August 2009</label>
     <list type="bulleted">
      <item>AP: Removed (commented out) the modification of <gi>category</gi>; <gi>desc</gi> will be used instead of <gi>catDesc</gi> for the bilingual description of categories.</item>
      <item>AP: Added <att>xml:lang</att> to <gi>nkjp:topic</gi>.</item>
     </list>
    </item>
    <item>
     <label>Version 0.6.2, 25 September 2009</label>
     <list type="bulleted">
      <item>AP: Modified the reportoire of possible values of <att>nkjp:subcorpus</att>.</item>
     </list>
    </item>
   </list>
   <schemaSpec ident="NKJP_segmentation" start="teiCorpus" prefix="tei_">
    <!-- required modules -->
    <moduleRef key="header"/>
    <moduleRef key="core"/>
    <moduleRef key="corpus"/>
    <moduleRef key="spoken"/>
    <moduleRef key="namesdates"/>
    <moduleRef key="tei"/>
    <moduleRef key="textstructure"/>
    <!-- required to avoid Sanity Checker complaint -->
    <elementSpec ident="handNote" mode="delete" module="header"/>
    <elementSpec ident="typeNote" mode="delete" module="header"/>
    <!-- end of Sanity-Checker-related mods -->
    <!-- optional modules -->
    <moduleRef key="linking"/>
    <elementSpec module="linking" ident="alt" mode="delete"/>
    <elementSpec module="linking" ident="altGrp" mode="delete"/>
    <elementSpec module="linking" ident="anchor" mode="delete"/>
    <elementSpec module="linking" ident="join" mode="delete"/>
    <elementSpec module="linking" ident="joinGrp" mode="delete"/>
    <elementSpec module="linking" ident="link" mode="delete"/>
    <elementSpec module="linking" ident="linkGrp" mode="delete"/>
    <elementSpec module="linking" ident="link" mode="delete"/>
    <elementSpec module="linking" ident="timeline" mode="delete"/>
    <elementSpec module="linking" ident="when" mode="delete"/>
    <moduleRef key="analysis"/>
    <elementSpec module="analysis" ident="c" mode="delete"/>
    <elementSpec module="analysis" ident="cl" mode="delete"/>
    <elementSpec module="analysis" ident="interp" mode="delete"/>
    <elementSpec module="analysis" ident="interpGrp" mode="delete"/>
    <elementSpec module="analysis" ident="m" mode="delete"/>
    <elementSpec module="analysis" ident="pc" mode="delete"/>
    <elementSpec module="analysis" ident="phr" mode="delete"/>
    <elementSpec module="analysis" ident="span" mode="delete"/>
    <elementSpec module="analysis" ident="spanGrp" mode="delete"/>
    <elementSpec module="analysis" ident="w" mode="delete"/>
    <moduleRef key="iso-fs"/>
    <moduleRef key="tagdocs"/>

    <!-- Additions (specific to this level). -->

    <elementSpec ident="paren" ns="http://www.nkjp.pl/ns/1.0" mode="add">
     <desc>A generalized, semantically empty bracket element for grouping sequences of <gi>seg</gi>under choice. It may require the use of the <att>nkjp:nps</att> attribute on the <gi>seg</gi> elements that it contains.</desc>
     <classes>
      <memberOf key="model.choicePart"/>
     </classes>
     <content>
      <rng:oneOrMore xmlns:rng="http://relaxng.org/ns/structure/1.0">
       <rng:ref name="seg"/>
      </rng:oneOrMore>
     </content>
    </elementSpec>

    <elementSpec xmlns:rng="http://relaxng.org/ns/structure/1.0" ident="include" ns="http://www.w3.org/2001/XInclude" mode="add">
     <desc>The W3C XInclude element. ODD scheme by Sebastian Rahtz, simplified for NKJP.</desc>
     <classes>
      <memberOf key="model.common"/>
      <memberOf key="model.headerPart"/>
      <memberOf key="model.segLike"/>
     </classes>
     <content>
      <rng:empty/>
     </content>
     <attList>
      <attDef ident="href">
       <desc>pointer to the resource being included</desc>
       <datatype>
        <rng:ref name="data.pointer"/>
       </datatype>
      </attDef>
      <attDef ident="parse" usage="opt">
       <defaultVal>xml</defaultVal>
       <valList type="closed">
        <valItem ident="xml"/>
        <valItem ident="text"/>
       </valList>
      </attDef>
      <attDef ident="xpointer" usage="opt">
       <datatype>
        <rng:text/>
       </datatype>
      </attDef>
     </attList>
    </elementSpec>

    <!-- Changes to the module "linking". -->

    <elementSpec ident="seg" module="linking" mode="change">
     <attList>
      <attDef ident="type" mode="change">
       <defaultVal>token</defaultVal>
       <desc>Set by default to <val>token</val> for this file.</desc>
       <valList type="closed" mode="replace">
        <valItem ident="token"/>
       </valList>
      </attDef>
     </attList>
    </elementSpec>

    <!-- Changes to the module "tei". -->

    <classSpec ident="att.segLike" type="atts" mode="change" module="tei">
     <attList>
      <attDef ident="nps" mode="add" ns="http://www.nkjp.pl/ns/1.0">
       <desc>no-preceding-space, which is to mean "Although I am a segment, I am not separated from the preceding segment by a space." Useful for cases where the segment boundary is not marked by orthography. Defaults to "false".</desc>
       <datatype>
        <rng:ref name="data.truthValue"/>
       </datatype>
       <defaultVal>false</defaultVal>
      </attDef>
      <attDef ident="rejected" mode="add" ns="http://www.nkjp.pl/ns/1.0">
       <desc>Used to mark alternative segmentations that have been rejected. This attribute tells the processor to skip the given segment. (AP 090725: changed from <att>bad</att>.)</desc>
       <datatype minOccurs="1" maxOccurs="1">
        <rng:ref name="data.truthValue"/>
       </datatype>
       <defaultVal>false</defaultVal>
      </attDef>
     </attList>
    </classSpec>

    <!-- Only changes affecting headers below. -->

<!--     <elementSpec ident="category" module="header" mode="change"> -->
<!--      <desc>Contains one or more <gi>catDesc</gi> elements (one for each relevant language); may be -->
<!--       recursive.</desc> -->
<!--      <content> -->
<!--       <rng:oneOrMore> -->
<!--        <rng:ref name="catDesc"/> -->
<!--       </rng:oneOrMore> -->
<!--       <rng:zeroOrMore> -->
<!--        <rng:ref name="category"/> -->
<!--       </rng:zeroOrMore> -->
<!--      </content> -->
<!--     </elementSpec> -->

    <elementSpec ident="publicationStmt" module="header" mode="change">
     <attList>
      <attDef ident="subcorpus" mode="add" ns="http://www.nkjp.pl/ns/1.0" usage="opt">
       <desc>Possible values are: "balanced" (for text in the 300-million-word balanced subcorpus), "unbalanced" (for other texts which may be distributed by NKJP), "restricted" (for texts available only for the internal NKJP purposes, not to be distributed), "one_million" (for texts in the 1-million-word manually annotated sample).</desc> <defaultVal>restricted</defaultVal>
       <valList type="closed">
        <valItem ident="balanced"/>
        <valItem ident="unbalanced"/>
        <valItem ident="restricted"/>
        <valItem ident="one_million"/>
       </valList>
      </attDef>
     </attList>
    </elementSpec>

    <elementSpec ident="extent" module="header" mode="change">
     <attList>
      <attDef ident="file" mode="add" ns="http://www.nkjp.pl/ns/1.0" usage="req">
       <desc>Which file (level) does the extent refer to? (Possible
        values are text.xml, ann_segmentation.xml, etc.)</desc>
       <defaultVal>text.xml</defaultVal>
      </attDef>
     </attList>
    </elementSpec>

    <elementSpec ident="topic" ns="http://www.nkjp.pl/ns/1.0" mode="add">
     <desc>The topic of spoken conversation. It might seem that
      textDesc/domain could be used for this pupose, but, alas!,
      inclusion of textDesc makes it necessary to use all of its 8
      subelements (channel, constitution, derivation, etc.), while we
      only need something like domain...</desc>
     <classes>
      <memberOf key="model.profileDescPart"/>
     </classes>
     <content>
      <rng:text/>
     </content>
     <attList>
      <attDef ident="lang" mode="add" ns="http://www.w3.org/XML/1998/namespace" usage="opt">
       <desc>The usual xml:lang attribute.</desc>
       <datatype minOccurs="1" maxOccurs="1">
        <rng:ref name="data.name"/>
       </datatype>
      </attDef>
     </attList>
    </elementSpec>

    <elementSpec ident="fsLib" ns="http://www.nkjp.pl/ns/1.0" mode="add">
     <desc>Contains feature and feature-value libraries.</desc>
     <classes>
      <memberOf key="model.encodingPart"/>
     </classes>
     <content>
      <rng:oneOrMore>
       <rng:choice>
        <rng:ref name="fLib"/>
        <rng:ref name="fvLib"/>
       </rng:choice>
      </rng:oneOrMore>
     </content>
    </elementSpec>

   </schemaSpec>
  </body>
 </text>
</TEI>

<!-- Local Variables: -->
<!-- eval: (auto-fill-mode 0) -->
<!-- End: -->

