<?xml version="1.0"?>

<xsl:stylesheet id="stylesheet" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s-r="http://www.w3.org/2005/sparql-results#">

<xsl:template match="/s-r:sparql/s-r:results">
  <html>
  <head><title>Construct query results</title></head>
  <body>
    <h2>Results of your Construct query</h2>
    <table border="1">
      <tr bgcolor="#336699">
        <th align="left"><font color="white">Subject</font></th>
        <th align="left"><font color="white">Predicate</font></th>
        <th align="left"><font color="white">Object</font></th>
      </tr>
    <xsl:for-each select="s-r:result">
    <tr>
      <td><xsl:value-of select="s-r:binding[@name='subject']/s-r:uri"/> <xsl:value-of select="s-r:binding[@name='subject']/s-r:bnode"/></td>
      <td><xsl:value-of select="s-r:binding[@name='predicate']/s-r:uri"/></td>
      <td><xsl:value-of select="s-r:binding[@name='object']/s-r:uri"/>
          <xsl:value-of select="s-r:binding[@name='object']/s-r:bnode"/>
          <xsl:value-of select="s-r:binding[@name='object']/s-r:literal"/>
      </td>
    </tr>
    </xsl:for-each>
    </table>

  <p align="right"><font size="-1">For more information visit the <a href="http://www.context-infrastructure.org">Construct webpage</a></font></p>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet>
