<?xml version="1.0" encoding="UTF-8"?>
<!--
-
- $Id$
-
- This file is part of FetchBugs4.me prototype
-
- It is heavily inspired by the Yahoo stock quotes mapper from Virtuoso Sponger
-
- Copyright (C) 1998-2009 OpenLink Software
- Copyright (C) 2010 Institut TELECOM & Olivier BERGER
-
- This project is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; only version 2 of the License, dated June 1991.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY oslc "http://oslc.com/#">
<!ENTITY bibo "http://purl.org/ontology/bibo/">
<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
<!ENTITY dcterms "http://purl.org/dc/terms/">
<!ENTITY sioc "http://rdfs.org/sioc/ns#">
]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="&rdf;"
xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
xmlns:dc ="http://purl.org/dc/elements/1.1/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:oslc="&oslc;"
xmlns:foaf="&foaf;"
xmlns:bibo="&bibo;"
xmlns:sioc="&sioc;"
xmlns:dcterms="&dcterms;"
>
<xsl:output method="xml" indent="yes" />
<xsl:param name="baseUri" />
<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
<xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
<xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
<xsl:template match="/">
<rdf:RDF>
<xsl:apply-templates select="*"/>
</rdf:RDF>
</xsl:template>
<xsl:template match="cr">
<xsl:variable name="pt" select="vi:proxyIRI(concat('http://www.mantisbt.org/bugs/view.php?id=', bugnum))"/>
<rdf:Description rdf:about="{$docproxyIRI}">
<rdf:type rdf:resource="&bibo;Document"/>
<dc:title><xsl:value-of select="$baseUri"/></dc:title>
<sioc:container_of rdf:resource="{$pt}"/>
<foaf:primaryTopic rdf:resource="{$pt}"/>
<dcterms:subject rdf:resource="{$pt}"/>
<owl:sameAs rdf:resource="{$pt}"/>
</rdf:Description>
<rdf:Description rdf:about="{vi:proxyIRI(concat('http://www.mantisbt.org/bugs/view.php?id=', bugnum))}">
<rdf:type rdf:resource="&oslc;ChangeRequest"/>
<oslc:id>
<xsl:value-of select="bugnum"/>
</oslc:id>
<dc:title>
<xsl:value-of select="title"/>
</dc:title>
</rdf:Description>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>
|