<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="earl-xform.css" type="text/css"?>
<html:html xmlns="http://www.w3.org/2002/xforms/cr"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:earl="http://www.w3.org/WAI/ER/EARL/nmg-strawman#"
 xmlns:ev="http://www.w3.org/2001/xml-events" 
 xmlns:html="http://www.w3.org/1999/xhtml"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:wcag="http://www.w3.org/TR/WCAG10/#">

  <html:head>
    <html:title>WCAG evaluation in EARL through XForms - with priority selection</html:title>
    <model id="foaf">
      <instance id="default" src="./earlinst.rdf"/>
      <bind calculate="now()" nodeset="earl:WebContent/earl:date"/>
      <submission action="./newfile.xml" id="submit1" method="put"/> 
    </model>
  </html:head>
  <html:body>
  <html:h1>WCAG 1.0 evaluation in EARL</html:h1>
  <html:p>This tool was developed by <html:a html:href="http://www.w3.org/People/Charles">Charles McCathieNevile</html:a> as part of the <html:a html:href="../../Overview.html">SWAD-Europe project</html:a>. It helps you to record an evaluation of a document's accessibility according to WCAG 1.0 and record the results in EARL, using Xforms.</html:p>
  <html:p>This is a testing version to try and allow dynamic choice of the Testcases to be included in the form. So far it allows the user to show or hide groups of WCAG checkpoints by priority</html:p>
  <html:p>There is <html:a html:href="readme.html#these">help information</html:a> and <html:a html:href="readme.html#priEarlfor1">developers' information (including the toDo list)</html:a> available as part of the <html:a html:href="readme.html">EARL in Xforms documentation</html:a>.</html:p>
 
<html:h2>About you.</html:h2>
<html:p>Because different people and tools might make different judgements, EARL requires some way of identifying who makes a particular claim.</html:p>

    <group class="section">
      <input class="uri" ref="instance('default')/earl:Assertor/earl:name">
        <label>Your name</label>
      </input>
      <input class="uri" ref="earl:Assertor/earl:email/@rdf:resource">
        <label>Your email address</label>
      </input>
    </group>

<html:h2>The document you are evaluating</html:h2>
<html:p>Please give the URI for the document being evaluated, and the date that you tested it (as a simple way of being able to check if the document changed since then).</html:p>

    <group class="section">
      <input class="uri" ref="earl:WebContent/earl:reprOf/@rdf:resource">
        <label>The document URI</label>
      </input>
      <input class="uri" ref="earl:WebContent/earl:date">
        <label>The date of the evaluation</label>
      </input>
    </group>

<html:h2>The results</html:h2>
<html:p>This is pretty basic at the moment - you can select different values or leave it as not tested...</html:p>

    <group>
      <switch>
        <case id="Extrap2in" selected="true">
          <trigger id="Extrap2Button">
            <label>hide p2 checkpoints?</label>
            <toggle ev:event="xforms-activate" case="p2out"/>
            <toggle ev:event="xforms-activate" case="Extrap2out"/>
          </trigger>
        </case>
        <case id="Extrap2out" selected="false">
         <trigger id="Extrap2Button">
            <label>show p2 checkpoints?</label>
            <toggle ev:event="xforms-activate" case="p2in"/>
            <toggle ev:event="xforms-activate" case="Extrap2in"/>
          </trigger>
        </case>
      </switch>
      <switch>
        <case id="Extrap3in" selected="false">
          <trigger id="Extrap3Button">
            <label>show p3 checkpoints?</label>
            <toggle ev:event="xforms-activate" case="p3in"/>
            <toggle ev:event="xforms-activate" case="Extrap3out"/>
          </trigger>
        </case>
        <case id="Extrap3out" selected="true">
          <trigger id="Extrap3Button">
            <label>hide p3 checkpoints?</label>
            <toggle ev:event="xforms-activate" case="Extrap3in"/>
            <toggle ev:event="xforms-activate" case="p3out"/>
          </trigger>
        </case>
      </switch>
    </group>
	
    <repeat id="results">
<switch>
  <case id="p1in" selected="true">
      <trigger id="p1Button">
        <label>hide p1 checkpoints?</label>
        <toggle ev:event="xforms-activate" case="p1out"/>
        <toggle ev:event="xforms-activate" case="Extrap1out"/>
      </trigger>
    <repeat id="p1results" nodeset="earl:Assertion[earl:testcase/earl:TestCase/wcag:priority/@rdf:resource='http://www.w3.org/TR/WCAG10/#wc-priority-1']">
      <group class="section">
          <html:p><output ref="earl:testcase/earl:TestCase/wcag:checkpoint"/>
      [Priority 1]
       <select1 appearance="minimal" ref="earl:result/@rdf:type">
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#notTested</value>
              <label>Not tested</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#pass</value>
              <label>Passes the requirement</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#fail</value>
              <label>Fails the requirement</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#notApplicable</value>
              <label>The requirement is not applicable</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#cannotTell</value>
              <label>I cannot tell</label>
           </item>
         </select1>
         </html:p>
         <html:p>
          <output ref="earl:testcase/earl:TestCase/dc:title[@xml:lang='en']"/>
         </html:p>
      </group>
      <group class="uri">
        <textarea class="messageBody" ref="earl:message">
          <label>Comments</label>
          <hint>Enter any additional comments here</hint>
        </textarea>
       </group>
     </repeat>
  </case>
  <case id="p1out" selected="false">
      <trigger id="p1Button">
        <label>show p1 checkpoints?</label>
        <toggle ev:event="xforms-activate" case="p1in"/>
        <toggle ev:event="xforms-activate" case="Extrap1in"/>
      </trigger>
  </case>
</switch>

      <switch>
        <case id="Extrap1out" selected="true">
          <trigger id="Extrap1in">
            <label>hide p1 checkpoints?</label>
            <toggle ev:event="xforms-activate" case="Extrap1out"/>
            <toggle ev:event="xforms-activate" case="p1out"/>
          </trigger>
        </case>
      </switch>

<switch>
  <case id="p2in" selected="true">
      <trigger id="p2Button">
        <label>hide p2 checkpoints?</label>
        <toggle ev:event="xforms-activate" case="p2out"/>
        <toggle ev:event="xforms-activate" case="Extrap2out"/>
      </trigger>
      <repeat id="p2results" nodeset="earl:Assertion[earl:testcase/earl:TestCase/wcag:priority/@rdf:resource='http://www.w3.org/TR/WCAG10/#wc-priority-2']">
      <group class="section">
          <output ref="earl:testcase/earl:TestCase/dc:title"/>
       <select1 appearance="minimal" ref="earl:result/@rdf:resource">
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#notTested</value>
              <label>Not tested</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#pass</value>
              <label>Passes the requirement</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#fail</value>
              <label>Fails the requirement</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#notApplicable</value>
              <label>The requirement is not applicable</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#cannotTell</value>
              <label>I cannot tell</label>
           </item>
         </select1>
       </group>
      <group class="uri">
        <textarea class="messageBody" ref="earl:message">
          <label>Comments</label>
          <hint>Enter any additional comments here</hint>
        </textarea>
      </group>
     </repeat>
  </case>
  <case id="p2out" selected="false">
      <trigger id="p2Button">
        <label>show p2 checkpoints?</label>
        <toggle ev:event="xforms-activate" case="p2in"/>
        <toggle ev:event="xforms-activate" case="Extrap2in"/>
      </trigger>
  </case>
</switch>

<switch>
  <case id="p3in" selected="true">
      <trigger id="p3Button">
        <label>hide p3 checkpoints?</label>
        <toggle ev:event="xforms-activate" case="p3out"/>
        <toggle ev:event="xforms-activate" case="Extrap3out"/>
      </trigger>
      <repeat id="p3results" nodeset="earl:Assertion[earl:testcase/earl:TestCase/wcag:priority/@rdf:resource='http://www.w3.org/TR/WCAG10/#wc-priority-3']">
      <group class="section">
          <output ref="earl:testcase/earl:TestCase/dc:title"/>
       <select1 appearance="minimal" ref="earl:result/@rdf:resource">
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#notTested</value>
              <label>Not tested</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#pass</value>
              <label>Passes the requirement</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#fail</value>
              <label>Fails the requirement</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#notApplicable</value>
              <label>The requirement is not applicable</label>
           </item>
            <item>
              <value>http://www.w3.org/WAI/ER/EARL/nmg-strawman#cannotTell</value>
              <label>I cannot tell</label>
           </item>
         </select1>
       </group>
      <group class="uri">
        <textarea class="messageBody" ref="earl:message">
          <label>Comments</label>
          <hint>Enter any additional comments here</hint>
        </textarea>
      </group>
     </repeat>
  </case>
  <case id="p3out" selected="false">
      <trigger id="p3Button">
        <label>show p3 checkpoints?</label>
        <toggle ev:event="xforms-activate" case="p3in"/>
        <toggle ev:event="xforms-activate" case="Extrap3in"/>
      </trigger>
  </case>
</switch>


     </repeat>


      <group>
        <submit submission="submit1">
          <label>Generate the RDF</label> 
        </submit>
      </group>			
  </html:body>
</html:html>
