XLink.odd: Difference between revisions

From TEIWiki
Jump to navigation Jump to search
m + link to ODD
Syd (talk | contribs)
mNo edit summary
Line 6: Line 6:
     xmlns:rng="http://relaxng.org/ns/structure/1.0"
     xmlns:rng="http://relaxng.org/ns/structure/1.0"
     xmlns:xlink="http://www.w3.org/1999/xlink">
     xmlns:xlink="http://www.w3.org/1999/xlink">
  <teiHeader>
  <teiHeader>
      <fileDesc>
    <fileDesc>
        <titleStmt>
      <titleStmt>
            <title>Example of TEI Schema that Permits XLink</title>
        <title>Example of TEI Schema that Permits XLink</title>
            <author>Syd Bauman</author>
        <author>Syd Bauman</author>
        </titleStmt>
      </titleStmt>
        <publicationStmt>
      <publicationStmt>
  <publisher>Text Encoding Initiative Consortium</publisher>
        <publisher>Text Encoding Initiative Consortium</publisher>
  <availability status="free">
        <availability status="free">
    <p>Copyleft 2007 Text Encoding Initiative Consortium</p>
          <p>Copyleft 2007 Text Encoding Initiative Consortium</p>
  </availability>
        </availability>
</publicationStmt>
      </publicationStmt>
        <sourceDesc>
      <sourceDesc>
  <p>No source, this TEI document <emph>is</emph> the source.</p>
        <p>No source, this TEI document <emph>is</emph> the source.</p>
        </sourceDesc>
      </sourceDesc>
      </fileDesc>
    </fileDesc>
  </teiHeader>
  </teiHeader>
  <text>
  <text>
    <body>
    <body>
      <div>
      <div>
<head>Sample TEI ODD Customization that uses XLink</head>
        <head>Sample TEI ODD Customization that uses XLink</head>
<p>This sample ODD demonstrates a method for adding the W3C
        <p>This sample ODD demonstrates a method for adding the W3C
XLink attributes to elements that are members of the class
        XLink attributes to elements that are members of the class
<name type="class">att.pointing</name>. By default those
        <name type="class">att.pointing</name>. By default those
elements are: <gi>alt</gi>, <gi>altGrp</gi>,
        elements are: <gi>alt</gi>, <gi>altGrp</gi>,
<gi>joinGrp</gi>, <gi>linkGrp</gi>, <gi>join</gi>,
        <gi>joinGrp</gi>, <gi>linkGrp</gi>, <gi>join</gi>,
<gi>link</gi>, <gi>ptr</gi>, and <gi>ref</gi>. I do not claim
        <gi>link</gi>, <gi>ptr</gi>, and <gi>ref</gi>. I do not claim
that this is the only or the best way.</p>
        that this is the only or the best way.</p>
<p>This customization is intended to serve as an example on
        <p>This customization is intended to serve as an example on
how to customize the TEI schema a certain way, and the
        how to customize the TEI schema a certain way, and the
resulting schemas are not intended to actually be used for
        resulting schemas are not intended to actually be used for
encoding. This customization permits the root element of
        encoding. This customization permits the root element of
conforming instances to be <gi>div</gi>, even though such
        conforming instances to be <gi>div</gi>, even though such
instances are definitionally not TEI-conformant.</p>
        instances are definitionally not TEI-conformant.</p>
<schemaSpec ident="TEIxlink" start="TEI div">
        <schemaSpec ident="TEIxlink" start="TEI div">
  <!-- ******************************************************** -->
          <!-- ******************************************************** -->
  <!-- module inclusion section                                -->
          <!-- module inclusion section                                -->
  <!-- ******************************************************** -->
          <!-- ******************************************************** -->
  <moduleRef key="core"/>
          <moduleRef key="core"/>
  <moduleRef key="header"/>
          <moduleRef key="header"/>
  <moduleRef key="tei"/>
          <moduleRef key="tei"/>
  <moduleRef key="textstructure"/>
          <moduleRef key="textstructure"/>
  <moduleRef key="linking"/>  
          <moduleRef key="linking"/>      
  <!-- ******************************************************** -->
          <!-- ******************************************************** -->
  <!-- class alteration section                                -->
          <!-- class alteration section                                -->
  <!-- ******************************************************** -->
          <!-- ******************************************************** -->
  <classSpec module="tei" type="atts" ident="att.pointing" mode="change">
          <classSpec module="tei" type="atts" ident="att.pointing" mode="change">
    <attList>
            <attList>
      <attDef mode="add" ident="xlink:type">
              <attDef mode="add" ident="xlink:type">
<datatype><rng:ref name="data.enumerated"/></datatype>
                <datatype><rng:ref name="data.enumerated"/></datatype>
<valList type="closed">
                <valList type="closed">
  <valItem ident="simple"/>  
                  <valItem ident="simple"/>  
  <valItem ident="extended"/>  
                  <valItem ident="extended"/>  
  <valItem ident="locator"/>  
                  <valItem ident="locator"/>  
  <valItem ident="arc"/>  
                  <valItem ident="arc"/>  
  <valItem ident="resource"/>  
                  <valItem ident="resource"/>  
  <valItem ident="title"/>  
                  <valItem ident="title"/>  
  <valItem ident="none"/>
                  <valItem ident="none"/>
</valList>
                </valList>
<remarks>
                <remarks>
  <p>For additional constraints and semantics see <ptr
                  <p>For semantics and additional constraints see <ptr
  target="http://www.w3.org/TR/xlink/#link-types"/>.</p>
                  target="http://www.w3.org/TR/xlink/#link-types"/>.</p>
</remarks>
                </remarks>
      </attDef>
              </attDef>
      <attDef mode="add" ident="xlink:href">
              <attDef mode="add" ident="xlink:href">
<datatype><rng:ref name="data.pointer"/></datatype>
                <datatype><rng:ref name="data.pointer"/></datatype>
<remarks>
                <remarks>
  <p>For additional constraints and semantics see <ptr
                  <p>For semantics and additional constraints see <ptr
  target="http://www.w3.org/TR/xlink/#link-locators"/>.</p>
                  target="http://www.w3.org/TR/xlink/#link-locators"/>.</p>
</remarks>
                </remarks>
      </attDef>
              </attDef>
      <attDef mode="add" ident="xlink:role">
              <attDef mode="add" ident="xlink:role">
<datatype><rng:ref name="data.pointer"/></datatype>
                <datatype><rng:ref name="data.pointer"/></datatype>
<remarks>
                <remarks>
  <p>For additional constraints and semantics see <ptr
                  <p>For semantics and additional constraints see <ptr
  target="http://www.w3.org/TR/xlink/#link-semantics"/>.</p>
                  target="http://www.w3.org/TR/xlink/#link-semantics"/>.</p>
</remarks>
                </remarks>
      </attDef>
              </attDef>
      <attDef mode="add" ident="xlink:arcrole">
              <attDef mode="add" ident="xlink:arcrole">
<datatype><rng:ref name="data.pointer"/></datatype>
                <datatype><rng:ref name="data.pointer"/></datatype>
<remarks>
                <remarks>
  <p>For additional constraints and semantics see <ptr
                  <p>For semantics and additional constraints see <ptr
  target="http://www.w3.org/TR/xlink/#link-semantics"/>.</p>
                  target="http://www.w3.org/TR/xlink/#link-semantics"/>.</p>
</remarks>
                </remarks>
      </attDef>
              </attDef>
      <attDef mode="add" ident="xlink:title">
              <attDef mode="add" ident="xlink:title">
<datatype minOccurs="1" maxOccurs="unbounded"><rng:ref name="data.word"/></datatype>
                <datatype minOccurs="1" maxOccurs="unbounded"><rng:ref name="data.word"/></datatype>
<remarks>
                <remarks>
  <p>For additional constraints and semantics see <ptr
                  <p>For semantics and additional constraints see <ptr
  target="http://www.w3.org/TR/xlink/#link-semantics"/>.</p>
                  target="http://www.w3.org/TR/xlink/#link-semantics"/>.</p>
</remarks>
                </remarks>
      </attDef>
              </attDef>
      <attDef mode="add" ident="xlink:show">
              <attDef mode="add" ident="xlink:show">
<datatype><rng:ref name="data.enumerated"/></datatype>
                <datatype><rng:ref name="data.enumerated"/></datatype>
<valList type="closed">
                <valList type="closed">
  <valItem ident="new"/>  
                  <valItem ident="new"/>  
  <valItem ident="replace"/>  
                  <valItem ident="replace"/>  
  <valItem ident="embed"/>  
                  <valItem ident="embed"/>  
  <valItem ident="other"/>  
                  <valItem ident="other"/>  
  <valItem ident="none"/>
                  <valItem ident="none"/>
</valList>
                </valList>
<remarks>
                <remarks>
  <p>For additional constraints and semantics see <ptr
                  <p>For semantics and additional constraints see <ptr
  target="http://www.w3.org/TR/xlink/#show-att"/>.</p>
                  target="http://www.w3.org/TR/xlink/#show-att"/>.</p>
</remarks>
                </remarks>
      </attDef>
              </attDef>
      <attDef mode="add" ident="xlink:actuate">
              <attDef mode="add" ident="xlink:actuate">
<datatype><rng:ref name="data.enumerated"/></datatype>
                <datatype><rng:ref name="data.enumerated"/></datatype>
<valList type="closed">
                <valList type="closed">
  <valItem ident="onLoad"/>  
                  <valItem ident="onLoad"/>  
  <valItem ident="onRequest"/>  
                  <valItem ident="onRequest"/>  
  <valItem ident="other"/>  
                  <valItem ident="other"/>  
  <valItem ident="none"/>
                  <valItem ident="none"/>
</valList>
                </valList>
<remarks>
                <remarks>
  <p>For additional constraints and semantics see <ptr
                  <p>For semantics and additional constraints see <ptr
  target="http://www.w3.org/TR/xlink/#actuate-att"/>.</p>
                  target="http://www.w3.org/TR/xlink/#actuate-att"/>.</p>
</remarks>
                </remarks>
      </attDef>
              </attDef>
      <attDef mode="add" ident="xlink:label">
              <attDef mode="add" ident="xlink:label">
<datatype><rng:ref name="data.name"/></datatype>
                <datatype><rng:ref name="data.name"/></datatype>
<remarks>
                <remarks>
  <p>For additional constraints and semantics see <ptr
                  <p>For semantics and additional constraints see <ptr
  target="http://www.w3.org/TR/xlink/#traversal-atts"/>.</p>
                  target="http://www.w3.org/TR/xlink/#traversal-atts"/>.</p>
</remarks>
                </remarks>
      </attDef>
              </attDef>
      <attDef mode="add" ident="xlink:from">
              <attDef mode="add" ident="xlink:from">
<datatype><rng:ref name="data.name"/></datatype>
                <datatype><rng:ref name="data.name"/></datatype>
<remarks>
                <remarks>
  <p>For additional constraints and semantics see <ptr
                  <p>For semantics and additional constraints see <ptr
  target="http://www.w3.org/TR/xlink/#traversal-atts"/>.</p>
                  target="http://www.w3.org/TR/xlink/#traversal-atts"/>.</p>
</remarks>
                </remarks>
      </attDef>
              </attDef>
      <attDef mode="add" ident="xlink:to">
              <attDef mode="add" ident="xlink:to">
<datatype><rng:ref name="data.name"/></datatype>
                <datatype><rng:ref name="data.name"/></datatype>
<remarks>
                <remarks>
  <p>For additional constraints and semantics see <ptr
                  <p>For semantics and additional constraints see <ptr
  target="http://www.w3.org/TR/xlink/#traversal-atts"/>.</p>
                  target="http://www.w3.org/TR/xlink/#traversal-atts"/>.</p>
</remarks>
                </remarks>
      </attDef>
              </attDef>
    </attList>
            </attList>
  </classSpec>
          </classSpec>
</schemaSpec>
        </schemaSpec>
      </div>
      </div>
    </body>
    </body>
  </text>
  </text>
</TEI>
</TEI>
</nowiki></pre>
</nowiki></pre>


[[Category:Customization]]
[[Category:Customization]]

Revision as of 20:40, 14 November 2007

An ODD that demonstrates a way to add XLink attributes to att.pointing.

<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:lang="en" xmlns="http://www.tei-c.org/ns/1.0"
     xmlns:rng="http://relaxng.org/ns/structure/1.0"
     xmlns:xlink="http://www.w3.org/1999/xlink">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>Example of TEI Schema that Permits XLink</title>
        <author>Syd Bauman</author>
      </titleStmt>
      <publicationStmt>
        <publisher>Text Encoding Initiative Consortium</publisher>
        <availability status="free">
          <p>Copyleft 2007 Text Encoding Initiative Consortium</p>
        </availability>
      </publicationStmt>
      <sourceDesc>
        <p>No source, this TEI document <emph>is</emph> the source.</p>
      </sourceDesc>
    </fileDesc>
  </teiHeader>
  <text>
    <body>
      <div>
        <head>Sample TEI ODD Customization that uses XLink</head>
        <p>This sample ODD demonstrates a method for adding the W3C
        XLink attributes to elements that are members of the class
        <name type="class">att.pointing</name>. By default those
        elements are: <gi>alt</gi>, <gi>altGrp</gi>,
        <gi>joinGrp</gi>, <gi>linkGrp</gi>, <gi>join</gi>,
        <gi>link</gi>, <gi>ptr</gi>, and <gi>ref</gi>. I do not claim
        that this is the only or the best way.</p>
        <p>This customization is intended to serve as an example on
        how to customize the TEI schema a certain way, and the
        resulting schemas are not intended to actually be used for
        encoding. This customization permits the root element of
        conforming instances to be <gi>div</gi>, even though such
        instances are definitionally not TEI-conformant.</p>
        <schemaSpec ident="TEIxlink" start="TEI div">
          <!-- ******************************************************** -->
          <!-- module inclusion section                                 -->
          <!-- ******************************************************** -->
          <moduleRef key="core"/>
          <moduleRef key="header"/>
          <moduleRef key="tei"/>
          <moduleRef key="textstructure"/>
          <moduleRef key="linking"/>       
          <!-- ******************************************************** -->
          <!-- class alteration section                                 -->
          <!-- ******************************************************** -->
          <classSpec module="tei" type="atts" ident="att.pointing" mode="change">
            <attList>
              <attDef mode="add" ident="xlink:type">
                <datatype><rng:ref name="data.enumerated"/></datatype>
                <valList type="closed">
                  <valItem ident="simple"/> 
                  <valItem ident="extended"/> 
                  <valItem ident="locator"/> 
                  <valItem ident="arc"/> 
                  <valItem ident="resource"/> 
                  <valItem ident="title"/> 
                  <valItem ident="none"/>
                </valList>
                <remarks>
                  <p>For semantics and additional constraints see <ptr
                  target="http://www.w3.org/TR/xlink/#link-types"/>.</p>
                </remarks>
              </attDef>
              <attDef mode="add" ident="xlink:href">
                <datatype><rng:ref name="data.pointer"/></datatype>
                <remarks>
                  <p>For semantics and additional constraints see <ptr
                  target="http://www.w3.org/TR/xlink/#link-locators"/>.</p>
                </remarks>
              </attDef>
              <attDef mode="add" ident="xlink:role">
                <datatype><rng:ref name="data.pointer"/></datatype>
                <remarks>
                  <p>For semantics and additional constraints see <ptr
                  target="http://www.w3.org/TR/xlink/#link-semantics"/>.</p>
                </remarks>
              </attDef>
              <attDef mode="add" ident="xlink:arcrole">
                <datatype><rng:ref name="data.pointer"/></datatype>
                <remarks>
                  <p>For semantics and additional constraints see <ptr
                  target="http://www.w3.org/TR/xlink/#link-semantics"/>.</p>
                </remarks>
              </attDef>
              <attDef mode="add" ident="xlink:title">
                <datatype minOccurs="1" maxOccurs="unbounded"><rng:ref name="data.word"/></datatype>
                <remarks>
                  <p>For semantics and additional constraints see <ptr
                  target="http://www.w3.org/TR/xlink/#link-semantics"/>.</p>
                </remarks>
              </attDef>
              <attDef mode="add" ident="xlink:show">
                <datatype><rng:ref name="data.enumerated"/></datatype>
                <valList type="closed">
                  <valItem ident="new"/> 
                  <valItem ident="replace"/> 
                  <valItem ident="embed"/> 
                  <valItem ident="other"/> 
                  <valItem ident="none"/>
                </valList>
                <remarks>
                  <p>For semantics and additional constraints see <ptr
                  target="http://www.w3.org/TR/xlink/#show-att"/>.</p>
                </remarks>
              </attDef>
              <attDef mode="add" ident="xlink:actuate">
                <datatype><rng:ref name="data.enumerated"/></datatype>
                <valList type="closed">
                  <valItem ident="onLoad"/> 
                  <valItem ident="onRequest"/> 
                  <valItem ident="other"/> 
                  <valItem ident="none"/>
                </valList>
                <remarks>
                  <p>For semantics and additional constraints see <ptr
                  target="http://www.w3.org/TR/xlink/#actuate-att"/>.</p>
                </remarks>
              </attDef>
              <attDef mode="add" ident="xlink:label">
                <datatype><rng:ref name="data.name"/></datatype>
                <remarks>
                  <p>For semantics and additional constraints see <ptr
                  target="http://www.w3.org/TR/xlink/#traversal-atts"/>.</p>
                </remarks>
              </attDef>
              <attDef mode="add" ident="xlink:from">
                <datatype><rng:ref name="data.name"/></datatype>
                <remarks>
                  <p>For semantics and additional constraints see <ptr
                  target="http://www.w3.org/TR/xlink/#traversal-atts"/>.</p>
                </remarks>
              </attDef>
              <attDef mode="add" ident="xlink:to">
                <datatype><rng:ref name="data.name"/></datatype>
                <remarks>
                  <p>For semantics and additional constraints see <ptr
                  target="http://www.w3.org/TR/xlink/#traversal-atts"/>.</p>
                </remarks>
              </attDef>
            </attList>
          </classSpec>
        </schemaSpec>
      </div>
    </body>
  </text>
</TEI>