Difference between revisions of "XLink.odd"

From TEIWiki
Jump to navigation Jump to search
(initial upload of sample XLink ODD)
 
m (+ link to ODD)
Line 1: Line 1:
A demonstration of adding XLink attributes to <code>att.pointing</code>.
+
An [[ODD]] that demonstrates a way to add XLink attributes to <code>att.pointing</code>.
  
 
<pre><nowiki>
 
<pre><nowiki>

Revision as of 18:51, 3 April 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 additional constraints and semantics 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 additional constraints and semantics 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 additional constraints and semantics 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 additional constraints and semantics 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 additional constraints and semantics 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 additional constraints and semantics 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 additional constraints and semantics 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 additional constraints and semantics 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 additional constraints and semantics 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 additional constraints and semantics see <ptr
		   target="http://www.w3.org/TR/xlink/#traversal-atts"/>.</p>
		 </remarks>
	       </attDef>
	     </attList>
	   </classSpec>
 	 </schemaSpec>
       </div>
     </body>
   </text>
 </TEI>