<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
                xmlns:dc="http://purl.org/dc/elements/1.1/"
                xmlns:xt="http://www.jclark.com/xt"
		xmlns:sm="http://rdf.desire.org/vocab/sitemap.rdf#"
		xmlns:an="http://rdf.desire.org/vocab/recommend.rdf#" 
		xmlns:abc="http://xmlns.com/abc/1.0/" 
		xmlns:foaf="http://xmlns.com/foaf/0.1/" 
        	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	        xmlns:rdfs="http://www.w3.org/TR/WD-rdf-schema#"
	        extension-element-prefixes="xt"
		>
<!--

converts projects to rdf - title and description


-->

<xsl:output method="xml" indent="yes"/>  

<xsl:template>
	<xsl:apply-templates/>
</xsl:template>




<xsl:template match="html">

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/TR/WD-rdf-schema#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:an="http://rdf.desire.org/vocab/recommend.rdf#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:abc="http://xmlns.com/abc/1.0/" >




	<xsl:apply-templates select="body" /> 


</rdf:RDF>  


</xsl:template>



<xsl:template match="meta"> 


<xsl:if test="@name='DC.Creator'">


	<abc:agent>
	<foaf:person rdf:about="mailto:{@content}">
	<foaf:mbox rdf:resource="mailto:{@content}" />
	</foaf:person>

	</abc:agent>

</xsl:if>

<xsl:if test="@name='DC.Date'">


	<abc:date>
	 <xsl:value-of select="@content"/> 
	</abc:date>

</xsl:if>



</xsl:template>






<xsl:template match="body"> 




	<xsl:apply-templates select="table/tr" />

</xsl:template>



<xsl:template match="tr"> 

<xsl:variable name="tdatt" select="@about" />
<xsl:variable name="id" />


<xsl:if test="count(td)!=0">

<an:contentReportEvent>   

<abc:contribution>    

<abc:Action> 


<xsl:apply-templates select="/html/head/meta" /> 

</abc:Action> 

</abc:contribution>


<xsl:for-each select="td">   

<xsl:if test="position() = 4"> 

<abc:input rdf:resource="{.}" />   


</xsl:if>  

</xsl:for-each>

<abc:output>
<rdf:Bag> 


		<xsl:for-each select="td">


	<xsl:if test="position() = 1">

<rdf:li>
			<rdf:Description>

		<rdf:subject rdf:resource="{$tdatt}" />

		<rdf:predicate rdf:resource="http://purl.org/dc/elements/1.1/title" />
		<rdf:object><xsl:value-of select="."/> </rdf:object>

		<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement" />
			</rdf:Description>

</rdf:li>
	</xsl:if>

	<xsl:if test="position() = 2">

<rdf:li>
			<rdf:Description>

		<rdf:subject rdf:resource="{$tdatt}" />
		<rdf:predicate rdf:resource="http://purl.org/dc/elements/1.1/description" />
		<rdf:object><xsl:value-of select="."/> </rdf:object>
		<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement" />
			</rdf:Description>

</rdf:li>

	</xsl:if>



</xsl:for-each>



</rdf:Bag>   
</abc:output>   
</an:contentReportEvent>


</xsl:if>



</xsl:template>



</xsl:stylesheet>



