Skip to content

Commit

Permalink
Update rdf2html.xsl, owl2html.xsl and add priorVersion for oai-pmh
Browse files Browse the repository at this point in the history
  • Loading branch information
whikloj authored and Andrew Woods committed Mar 8, 2015
1 parent b71c377 commit 9bade9e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions indexing.rdf
Expand Up @@ -4,6 +4,7 @@
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<rdf:Description rdf:about="http://fedora.info/definitions/v4/indexing#">
Expand All @@ -12,6 +13,7 @@
<dcterms:publisher rdf:resource="http://fedorarepository.org/"/>
<rdfs:seeAlso rdf:resource="https://wiki.duraspace.org/display/FEDORA4x/External+Search"/>
<rdfs:comment xml:lang="en">Ontology for indexing configuration in Fedora repositories.</rdfs:comment>
<owl:versionInfo>v4/2015/02/04</owl:versionInfo>
</rdf:Description>

<rdf:Property rdf:about="http://fedora.info/definitions/v4/indexing#hasIndexingTransformation">
Expand Down
2 changes: 2 additions & 0 deletions oai-pmh.rdf
Expand Up @@ -9,6 +9,8 @@
<owl:Ontology rdf:about="http://fedora.info/definitions/v4/oai-pmh#">
<rdfs:label xml:lang="en">Fedora Commons OAI-PMH Ontology</rdfs:label>
<rdfs:comment xml:lang="en">Describes relationships between Fedora Commons Repository objects used to provide an OAI-PMH service.</rdfs:comment>
<owl:versionInfo>v4/2015/02/04</owl:versionInfo>
<owl:priorVersion rdf:resource="http://fedora.info/definitions/v4/2014/11/27/oai-pmh"/>
</owl:Ontology>

<owl:ObjectProperty rdf:about="http://fedora.info/definitions/v4/oai-pmh#isPartOfOAISet">
Expand Down
11 changes: 11 additions & 0 deletions owl2html.xsl
Expand Up @@ -7,6 +7,7 @@
<xsl:output method="html"/>
<xsl:variable name="title" select="/rdf:RDF/owl:Ontology/rdfs:label"/>
<xsl:variable name="about" select="/rdf:RDF/owl:Ontology/@rdf:about"/>
<xsl:variable name="priorVersion" select="/rdf:RDF/owl:Ontology/owl:priorVersion/@rdf:resource"/>
<xsl:template match="/rdf:RDF">
<html>
<head>
Expand All @@ -18,6 +19,7 @@
.label { margin-left: 1em; font-style:italic; }
.comment { margin-left: 1em; }
.property { margin-left: 1em; }
.version { margin-left: 1em; }
</style>
</head>
<body>
Expand All @@ -26,6 +28,15 @@
<xsl:for-each select="/rdf:RDF/owl:Ontology/rdfs:comment">
<div class="comment"><xsl:value-of select="."/></div>
</xsl:for-each>
<xsl:if test="not(/rdf:RDF/owl:Ontology/owl:versionInfo = '')">
<div class="version">Version: <xsl:value-of select="/rdf:RDF/owl:Ontology/owl:versionInfo"/></div>
</xsl:if>
<xsl:if test="not($priorVersion = '')">
<div class="version">Prior version: <a>
<xsl:attribute name="href"><xsl:value-of select="$priorVersion"/></xsl:attribute>
<xsl:value-of select="$priorVersion"/></a>
</div>
</xsl:if>

<div class="table-of-contents">
<h2>Table of Contents</h2>
Expand Down
5 changes: 5 additions & 0 deletions rdfs2html.xsl
Expand Up @@ -12,6 +12,7 @@
<xsl:variable name="modified" select="/rdf:RDF/rdf:Description[1]/dcterms:modified"/>
<xsl:variable name="publisher" select="/rdf:RDF/rdf:Description[1]/dcterms:publisher/@rdf:resource"/>
<xsl:variable name="seeAlso" select="/rdf:RDF/rdf:Description[1]/rdfs:seeAlso/@rdf:resource"/>
<xsl:variable name="versionInfo" select="/rdf:RDF/rdf:Description/owl:versionInfo"/>


<xsl:template match="/">
Expand All @@ -28,6 +29,7 @@
.modified { margin-left: 1em; }
.published { margin-left: 1em; }
.seealso { margin-left: 1em; }
.version { margin-left: 1em; }
</style>
</head>
<body>
Expand All @@ -36,6 +38,9 @@
<div class="comment"><xsl:value-of select="$comment"/></div>
<div class="modified">Modified: <xsl:value-of select="$modified"/></div>
<div class="published">Published by: <a href="{$publisher}"><xsl:value-of select="$publisher"/></a></div>
<xsl:if test="not($versionInfo = '')">
<div class="version">Version Info: <xsl:value-of select="$versionInfo" /></div>
</xsl:if>
<xsl:if test="$seeAlso != ''">
<div class="seealso">See Also: <a href="{$seeAlso}"><xsl:value-of select="$seeAlso"/></a></div>
</xsl:if>
Expand Down
2 changes: 2 additions & 0 deletions repository.rdf
Expand Up @@ -18,6 +18,8 @@
<owl:Ontology rdf:about="http://fedora.info/definitions/v4/repository#">
<rdfs:label xml:lang="en">Fedora Commons Repository Ontology</rdfs:label>
<rdfs:comment xml:lang="en">Ontology for the Fedora data model, intended primarily to make it possible to expose Fedora-curated RDF predicates via de-reference-able URIs.</rdfs:comment>
<owl:versionInfo>v4/2015/02/04</owl:versionInfo>
<owl:priorVersion rdf:resource="http://fedora.info/definitions/v4/2014/11/27/repository" />
</owl:Ontology>


Expand Down

0 comments on commit 9bade9e

Please sign in to comment.