<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:lang="en"  xmlns="http://www.tei-c.org/ns/1.0" n="testmeta2010"
     xmlns:sch="http://purl.oclc.org/dsdl/schematron"
 xmlns:rng="http://relaxng.org/ns/structure/1.0">
   <teiHeader>
      <fileDesc>
         <titleStmt>
            <title>Testing new ODD features added spring 2010</title>
         </titleStmt>
         <publicationStmt>
	   <p> </p>
	 </publicationStmt>
         <sourceDesc>
            <p>authored from scratch</p>
         </sourceDesc>
      </fileDesc>
   </teiHeader>
   <text>
     <body>
       <p>First, define the very bare list of the elements we expect to see in
       the output schema. Just these elements, no more and no less.</p>
       <specGrp xml:id="Include">
	 <elementRef key="TEI"/>
	 <elementRef key="author"/>
	 <elementRef key="back"/>
	 <elementRef key="body"/>
	 <elementRef key="div"/>
	 <elementRef key="fileDesc"/>
	 <elementRef key="publicationStmt"/>
	 <elementRef key="front"/>
	 <elementRef key="head"/>
	 <elementRef key="item"/>
	 <elementRef key="label"/>
	 <elementRef key="list"/>
	 <elementRef key="p"/>
	 <elementRef key="hi"/>
	 <elementRef key="sourceDesc"/>
	 <elementRef key="revisionDesc"/>
	 <elementRef key="change"  source="/usr/share/xml/tei/odd/p5subset.xml"/>
	 <elementRef key="teiHeader"/>
	 <elementRef key="text"/>
	 <elementRef key="title"/>
	 <elementRef key="titleStmt"/>

       </specGrp>

       <p>Now make some changes and deletions</p>
       <specGrp xml:id="Changes">
	 <elementSpec ident="list" mode="change">
	   <attList>
	     <attDef ident="type" mode="change">
	       <constraintSpec mode="add" ident="a1" scheme="isoschematron">
		 <constraint>
		   <sch:assert
		       test="count(ancestor-or-self::tei:list[1]/tei:item)&lt;2">list
		 too short </sch:assert></constraint>
	       </constraintSpec>
	       <valList type="closed" mode="replace">
		 <valItem ident="enumerated"/>
		 <valItem ident="itemized"/>
	       </valList>
	     </attDef>
	   </attList>
	 </elementSpec>
	 <classSpec ident="att.canonical" type="atts" mode="delete"/>
	 <classSpec ident="att.global" type="atts" mode="change">
	   <attList>
	     <attDef ident="rendition" mode="delete"/>
	   </attList>
	 </classSpec>
	 <macroSpec ident="macro.specialPara" mode="change">
	   <content>
	     <zeroOrMore xmlns="http://relaxng.org/ns/structure/1.0">
	       <choice>
		 <text/>
		 <ref name="model.phrase"/>
	       </choice>
	     </zeroOrMore>
	   </content>
	 </macroSpec>
	 <elementSpec ident="div" mode="change">
	   <attList>
	     <attDef ident="type" mode="delete"/>
	     <attDef ident="rend" mode="change">
	       <valList type="closed" mode="add">
		 <valItem ident="i">
		   <gloss>italic</gloss>
		 </valItem>
		 <valItem ident="b">
		   <gloss>bold</gloss>
		 </valItem>
	       </valList>
	     </attDef>
	   </attList>
	 </elementSpec>
	 <classSpec mode="change" type="atts" ident="att.docStatus">
	   <attList>
	     <attDef ident="status" mode="change">
	       <valList  type="closed" mode="replace">
		 <valItem ident="good"/>
		 <valItem ident="bad"/>
	       </valList>
	     </attDef>
	   </attList>
	 </classSpec>

       </specGrp>

       <p>Now add an element in another namespace, implementing parts
       of TBX. The <gi>admin</gi> element has <gi>hi</gi> as its
       content model, but the TBX one and not the TEI one.</p>
       <specGrp xml:id="TBX">
	 <elementSpec 
	     prefix="tbx_"
	     mode="add"
	     ns="http://www.lisa.org/TBX-Specification.33.0.html"
	     ident="admin">
	   <desc>Contains information of an administrative nature for the node (parent element)
	   in question, such as the source of information, or the project or client for
	   which it applies.</desc>
	   <classes>
	     <memberOf key="model.hiLike"/>
	   </classes>
	   <content autoPrefix="false">
	     <rng:ref name="tei_hi"/>
	   </content>
	 </elementSpec>
	 
	 <elementSpec 
	     prefix="tbx_"
	     mode="add"
	     ns="http://www.lisa.org/TBX-Specification.33.0.html"
	     ident="hi">
	   <desc> Highlights a segment of text and optionally points to another element.</desc>
	   <content>
	     <rng:text/>
	   </content>
	 </elementSpec>
       </specGrp>
       
       <p>The schema built using version 1.5 of TEI P5</p>

       <schemaSpec ident="testmeta2010" prefix="tei_" start="TEI" source="http://www.tei-c.org/Vault/P5/1.5.0/xml/tei/odd/p5subset.xml">
	 <moduleRef key="tei"/>
	 <moduleRef key="figures" except="table row cell"/>
	 <moduleRef key="namesdates" include="persName"/>
	 <specGrpRef target="#Include"/>
	 <specGrpRef target="#Changes"/>
	 <specGrpRef target="#TBX"/>
       </schemaSpec>

       <p>The schema build using a tei: URI </p>
       <schemaSpec ident="testmeta2010_3" prefix="tei_" start="TEI" source="tei:1.5.0">
	 <moduleRef key="tei"/>
	 <moduleRef key="figures" except="table row cell"/>
	 <moduleRef key="namesdates" include="persName"/>
	 <specGrpRef target="#Include"/>
	 <specGrpRef target="#Changes"/>
	 <specGrpRef target="#TBX"/>
       </schemaSpec>
       <p>The schema build using the current release </p>
       <schemaSpec ident="testmeta2010_4" prefix="tei_" start="TEI" source="http://www.tei-c.org/Vault/P5/current/xml/tei/odd/p5subset.xml">
	 <moduleRef key="tei"/>
	 <moduleRef key="figures" except="table row cell"/>
	 <moduleRef key="namesdates" include="persName"/>
	 <specGrpRef target="#Include"/>
	 <specGrpRef target="#Changes"/>
	 <specGrpRef target="#TBX"/>
       </schemaSpec>
       <p>The schema build using the current release (TEI uri)</p>
       <schemaSpec ident="testmeta2010_5" prefix="tei_" start="TEI" source="tei:current">
	 <moduleRef key="tei"/>
	 <moduleRef key="figures" except="table row cell"  source="/usr/share/xml/tei/odd/p5subset.xml"/>
	 <moduleRef key="namesdates" include="persName"/>
	 <specGrpRef target="#Include"/>
	 <specGrpRef target="#Changes"/>
	 <specGrpRef target="#TBX"/>
       </schemaSpec>
       <p>The schema build using defaults </p>
       <schemaSpec ident="testmeta2010_6" start="TEI">
	 <moduleRef key="tei"/>
	 <moduleRef key="figures" except="table row cell"  source="/usr/share/xml/tei/odd/p5subset.xml"/>
	 <specGrpRef target="#Include"/>
	 <specGrpRef target="#Changes"/>
	 <specGrpRef target="#TBX"/>
       </schemaSpec>

       <p>The schema build using local fixed reference</p>
       <schemaSpec ident="testmeta2010_7" start="TEI" source="/usr/share/xml/tei/odd/p5subset.xml">
	 <moduleRef key="tei"/>
	 <specGrpRef target="#Include"/>
	 <specGrpRef target="#Changes"/>
	 <specGrpRef target="#TBX"/>
       </schemaSpec>

       <p>Including attribute classes </p>
       <schemaSpec ident="testmeta2010_8" prefix="tei_" start="TEI" source="http://www.tei-c.org/Vault/P5/1.5.0/xml/tei/odd/p5subset.xml">
	 <moduleRef key="tei"/>
	 <moduleRef key="figures" except="table row cell"/>
	 <moduleRef key="namesdates" include="att.datable.iso persName"/>
	 <specGrpRef target="#Include"/>
	 <specGrpRef target="#Changes"/>
	 <specGrpRef target="#TBX"/>
       </schemaSpec>


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