<?xml version="1.0"?>
<!--
	# An HTML view for the a single RDFa TC  
-->
<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:test="http://www.w3.org/2006/03/test-description#"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
	xmlns:owl="http://www.w3.org/2002/07/owl#"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
	exclude-result-prefixes="rdf rdfs owl dc xsd #default"
	version="1.0">
	
<xsl:output
	method="html"
	indent="yes"
	omit-xml-declaration="no"
	encoding="utf-8"/>

<xsl:param name="TCID" />


<xsl:template match="/">
  <xsl:choose > 
    	<xsl:when test="rdf:RDF/test:TestCase[@rdf:about=$TCID]" > 
			<xsl:apply-templates select="rdf:RDF/test:TestCase[@rdf:about=$TCID]"/>
		</xsl:when> 
		<xsl:otherwise > 
  			The TC <xsl:value-of select = "$TCID" /> is not defined. Please consult the <a href="http://www.w3.org/2006/07/SWD/RDFa/testsuite/">RDFa Test Suite</a>.       
        </xsl:otherwise>
	</xsl:choose>  	
</xsl:template>

<xsl:template match="rdf:RDF/test:TestCase">
	 <div>
      <table border="1">
        <tbody>
          <tr>
          	<td rowspan="1" colspan="1">
              <p>              
              	<xsl:element name="a">
              		<xsl:attribute name="href" >
              	     <xsl:value-of select="./@rdf:about" />           
              	    </xsl:attribute>
              	     <xsl:value-of select="./@rdf:about" />
              	</xsl:element>
              </p>
            </td>
            <td rowspan="1" colspan="1">
              <p><xsl:value-of select="./dc:title" /></p>
            </td>
          </tr>
          
          <tr>
          	<td colspan="2" rowspan="1">
          		<p><xsl:value-of select="./test:purpose" /></p>
            </td>
          </tr>
          
          <tr>
          	<td rowspan="1" colspan="1">
            	<p><xsl:value-of select="./test:specificationReference" /></p>
            </td>
            <td rowspan="1" colspan="1">
            	<p>
            	 <xsl:element name="a">
              		<xsl:attribute name="href" >
              	     <xsl:value-of select="./test:reviewStatus/@rdf:resource" />           
              	    </xsl:attribute>
              	     <xsl:value-of select="./test:reviewStatus/@rdf:resource" />
              	 </xsl:element>
              	</p>	
            </td>
          </tr>
          
          <tr>
          	<td rowspan="1" colspan="1">
            	<p>
            	<xsl:element name="a">
              		<xsl:attribute name="href" >
              	     <xsl:value-of select="./test:informationResourceInput/@rdf:resource" />           
              	    </xsl:attribute>
              	     <xsl:value-of select="./test:informationResourceInput/@rdf:resource" />
              	 </xsl:element>            	
            	</p>
            </td>
            <td rowspan="1" colspan="1">
            	<p>
            	<xsl:element name="a">
              		<xsl:attribute name="href" >
              	     <xsl:value-of select="./test:informationResourceResults/@rdf:resource" />           
              	    </xsl:attribute>
              	     <xsl:value-of select="./test:informationResourceResults/@rdf:resource" />
              	 </xsl:element>            	
            	</p>
            </td>
          </tr>
          
          <tr>
          	<td colspan="2" rowspan="1">
              <p><xsl:value-of select="./dc:contributor" /></p>
            </td>
          </tr>
          
          </tbody>
        </table>
      </div>
      <br />
</xsl:template>


</xsl:stylesheet>
