<?xml version="1.0" encoding="utf-8"?>

<!-- chump2annotations.xsl, style sheet to generate an Annotea Annotation feed of the w3c RDFIG Chump page http:///rdfig.xmlhack.com $Id: chump2annotea.xsl,v 1.10 2001/12/11 19:49:12 em Exp $  -->

<xsl:stylesheet 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
  xmlns:dc="http://purl.org/dc/elements/1.0/"
  xmlns:an="http://www.w3.org/2000/10/annotation-ns#"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:h="http://www.w3.org/1999/xx/http#"
  version="1.0">

<xsl:output method="xml" indent="yes" encoding="us-ascii"/>

<xsl:variable name="uri">http://rdfig.xmlhack.com/#</xsl:variable>

<xsl:template match="last-updated">
  <last-updated><xsl:value-of select='.'/></last-updated>
</xsl:template>

<xsl:template match="topic">
  <xsl:variable name="topic" />
</xsl:template>

<xsl:template match="itemcount">
  <xsl:variable name="itemcount" />
</xsl:template>

<xsl:template match="link">

<an:Annotation>

 <xsl:choose>
   <xsl:when test="url">
     <an:annotates rdf:resource = "{url}" />
     <an:context><xsl:value-of select='url'/>#xpointer(/html[1])</an:context>
   </xsl:when>
   <xsl:otherwise>
     <!-- eventually construct uri something like http://rdfig.xmlhack.com/2001/10/29/2001-10-29.html#1004398497.374542 -->
     <an:annotates rdf:resource = "#{time/@value}" />
     <an:context>#xpointer(/html[1])</an:context>
   </xsl:otherwise>
 </xsl:choose>
 
 <rdf:type rdf:resource = "http://www.w3.org/2001/09/chump/vocab#Chump" />
 <dc:creator>Semantic Web / RDF Interest Group</dc:creator>
 <dc:title><xsl:value-of select='title'/></dc:title>
 <dc:date><xsl:value-of select='time'/></dc:date>
 <an:body>
   <rdf:Description>
     <h:ContentType>text/html</h:ContentType>
     <h:Body rdf:parseType="Literal">
     <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
       <title><xsl:value-of select='title'/></title>
      </head>
      <body>    
       <p>
        <xsl:for-each select="comment">
         <b><xsl:value-of select='@nick'/>: </b> <xsl:copy-of select='.'/> <br />
        </xsl:for-each> 
       </p>
      </body>
     </html>
     </h:Body>
   </rdf:Description>
 </an:body>
</an:Annotation>

</xsl:template>

<xsl:template match="churn">
<rdf:RDF>
  <xsl:apply-templates/>
</rdf:RDF>
</xsl:template>

</xsl:stylesheet>

