<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<annex xmlns:sch="http://purl.oclc.org/dsdl/schematron" normative="true" id="schematron-derived-annex"
xmlns="http://purl.oclc.org/dsdl/9573-11amd1/ns/structure/1.0" >
   <title>Schema for Schematron Validation Report Language</title>
   <clause id="schematron-derived-annex-intro">
      <title>Introduction</title>
      <p>The Schematron Validation Report Language is a simple language 
        for implementations to use to compare their conformance. It is 
        basically a list of all the assertions that fail when validating 
        a document, in any order, together with other information such 
        as which rules fire.
    </p>
      <p>This schema can be used to validate SVRL documents, and provides
        examples of the use of abstract rules and abstract patterns.</p>
      <p>The following table lists the namespaces and typical prefixes.</p>
      <p>
         <tabular frame="all">
            <tgroup cols="2">
               <thead>
                  <row>
                     <entry>Prefix</entry>
                     <entry>Namespace IRI</entry>
                  </row>
               </thead>
               <tbody>
                  <row>
                     <entry>svrl</entry>
                     <entry>http://purl.oclc.org/dsdl/svrl</entry>
                  </row>
               </tbody>
            </tgroup>
         </tabular>
      </p>
   </clause>
   <clause id="schematron-derived-annex-elements">
      <title>Elements</title>
      <p>To conform to this clause, a document should conform to the following constraints:</p>
      <ol>
         <li>
            <p>
                The <code>svrl:schematron-output</code> element is the root element.
            </p>
         </li>
         <li>
            <p>
                <code>svrl:schematron-output</code> may only contain the following elements: 
                text, ns-prefix-in-attribute-values, active-pattern, fired-rule, failed-assert 
                and successful-report.
            </p>
         </li>
         <li>
            <p>
                <code>svrl:schematron-output</code> should have at least one active pattern.
            </p>
         </li>
         <li>
            <p> 
                The <code>svrl:text</code> element should not contain any elements.
            </p>
         </li>
         <li>
            <p> 
                The <code>svrl:diagnostic-reference</code> element should not contain any elements.
            </p>
         </li>
         <li>
            <p>
                <code>svrl:diagnostic-reference</code> should have a diagnostic attribute, 
                giving the id of the diagnostic.
            </p>
         </li>
         <li>
            <p>
                The <code>svrl:ns-prefix-in-attribute-values</code> element is a child of schematron-output.
            </p>
         </li>
         <li>
            <p> 
                The <code>svrl:ns-prefix-in-attribute-values</code> element should not contain any elements.
            </p>
         </li>
         <li>
            <p>
                The <code>svrl:ns-prefix-in-attribute-values</code> element should be empty.
            </p>
         </li>
         <li>
            <p> 
                A <code>svrl:ns-prefix-in-attribute-values</code> comes before an active-pattern or another 
                ns-prefix-in-attribute-values element.
            </p>
         </li>
         <li>
            <p>
                The <code>svrl:active-pattern</code> element is a child of schematron-output.
            </p>
         </li>
         <li>
            <p> 
                The <code>svrl:active-pattern</code> element should not contain any elements.
            </p>
         </li>
         <li>
            <p>
                The <code>svrl:active-pattern</code> element should be empty.
            </p>
         </li>
         <li>
            <p>
                The <code>svrl:fired-rule</code> element is a child of schematron-output.
            </p>
         </li>
         <li>
            <p> 
                The <code>svrl:fired-rule</code> element should not contain any elements.
            </p>
         </li>
         <li>
            <p>
                The <code>svrl:fired-rule</code> element should be empty.
            </p>
         </li>
         <li>
            <p>
                A <code>svrl:fired-rule</code> comes after an active-pattern, an empty 
                fired-rule, a failed-assert or a successful report.
            </p>
         </li>
         <li>
            <p>
                The <code>svrl:fired-rule</code> element should have a context attribute 
                giving the current context, in simple XPath format.
            </p>
         </li>
         <li>
            <p>
                The <code>svrl:failed-assert | svrl:successful-report</code> element is a child of schematron-output.
            </p>
         </li>
         <li>
            <p> 
                The <code>svrl:failed-assert | svrl:successful-report</code> element should only contain a text element 
                and diagnostic reference elements.
            </p>
         </li>
         <li>
            <p> 
                The <code>svrl:failed-assert | svrl:successful-report</code> element should only contain a text element.
            </p>
         </li>
         <li>
            <p> 
                A <code>svrl:failed-assert | svrl:successful-report</code> comes after a fired-rule, a failed-assert or a
                successful-report.
            </p>
         </li>
      </ol>
      <p>To conform to this clause, an application should report the following cases:</p>
      <ol>
         <li>
            <p>
                An unknown <code>*</code> element has been used.
            </p>
         </li>
      </ol>
   </clause>
   <clause id="schematron-derived-annex-UniqueIds">
      <title>Unique Ids</title>
      <p>To conform to this clause, a document should conform to the following constraints:</p>
      <ol>
         <li>
            <p> 
                Id attributes should be unique in a document.
            </p>
         </li>
      </ol>
   </clause>
   <clause id="schematron-derived-annex-requiredAttribute">
      <title>Required Attributes</title>
      <p>For each of the following parameter tables, the constraints below apply.</p>
      <note>
         <p>The following names and values may be XPath expressions. <code>@</code> is
   selects an attribute name. <code>$</code> selects a parameter. </p>
      </note>
      <ol>
         <li>
            <p>
               <tabular frame="all">
                  <tgroup cols="2">
                     <thead>
                        <row>
                           <entry>Parameter Name</entry>
                           <entry>Parameter Value</entry>
                        </row>
                     </thead>
                     <tbody>
                        <row>
                           <entry>
                              <code>
                                 <i>context</i>
                              </code>
                           </entry>
                           <entry>svrl:diagnostic-reference</entry>
                        </row>
                        <row>
                           <entry>
                              <code>
                                 <i>attribute</i>
                              </code>
                           </entry>
                           <entry>@diagnostic</entry>
                        </row>
                     </tbody>
                  </tgroup>
               </tabular>
            </p>
         </li>
         <li>
            <p>
               <tabular frame="all">
                  <tgroup cols="2">
                     <thead>
                        <row>
                           <entry>Parameter Name</entry>
                           <entry>Parameter Value</entry>
                        </row>
                     </thead>
                     <tbody>
                        <row>
                           <entry>
                              <code>
                                 <i>context</i>
                              </code>
                           </entry>
                           <entry>svrl:failed-assert or svrl:successful-report</entry>
                        </row>
                        <row>
                           <entry>
                              <code>
                                 <i>attribute</i>
                              </code>
                           </entry>
                           <entry>@location</entry>
                        </row>
                     </tbody>
                  </tgroup>
               </tabular>
            </p>
         </li>
         <li>
            <p>
               <tabular frame="all">
                  <tgroup cols="2">
                     <thead>
                        <row>
                           <entry>Parameter Name</entry>
                           <entry>Parameter Value</entry>
                        </row>
                     </thead>
                     <tbody>
                        <row>
                           <entry>
                              <code>
                                 <i>context</i>
                              </code>
                           </entry>
                           <entry>svrl:failed-assert or svrl:successful-report</entry>
                        </row>
                        <row>
                           <entry>
                              <code>
                                 <i>attribute</i>
                              </code>
                           </entry>
                           <entry>@test</entry>
                        </row>
                     </tbody>
                  </tgroup>
               </tabular>
            </p>
         </li>
         <li>
            <p>
               <tabular frame="all">
                  <tgroup cols="2">
                     <thead>
                        <row>
                           <entry>Parameter Name</entry>
                           <entry>Parameter Value</entry>
                        </row>
                     </thead>
                     <tbody>
                        <row>
                           <entry>
                              <code>
                                 <i>context</i>
                              </code>
                           </entry>
                           <entry>svrl:ns-prefix-in-attribute-values</entry>
                        </row>
                        <row>
                           <entry>
                              <code>
                                 <i>attribute</i>
                              </code>
                           </entry>
                           <entry>@uri</entry>
                        </row>
                     </tbody>
                  </tgroup>
               </tabular>
            </p>
         </li>
         <li>
            <p>
               <tabular frame="all">
                  <tgroup cols="2">
                     <thead>
                        <row>
                           <entry>Parameter Name</entry>
                           <entry>Parameter Value</entry>
                        </row>
                     </thead>
                     <tbody>
                        <row>
                           <entry>
                              <code>
                                 <i>context</i>
                              </code>
                           </entry>
                           <entry>svrl:ns-prefix-in-attribute-values</entry>
                        </row>
                        <row>
                           <entry>
                              <code>
                                 <i>attribute</i>
                              </code>
                           </entry>
                           <entry>@prefix</entry>
                        </row>
                     </tbody>
                  </tgroup>
               </tabular>
            </p>
         </li>
      </ol>
      <p>To conform to this clause, a document should conform to the following constraints, 
         after substituting named parameters with the value above in each each case:</p>
      <ol>
         <li>
            <p>
                The <code>
                  <i> $context </i>
               </code> element should have a 
                <code>
                  <i>$attribute /name()</i>
               </code> attribute.
            </p>
         </li>
      </ol>
   </clause>
</annex>