"Fossies" - the Fresh Open Source Software Archive

Member "static/constraints/owl2html.xsl" (22 Jul 2020, 1983 Bytes) of package /linux/www/fcrepo-webapp-5.1.1.war:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <?xml version="1.0" encoding="UTF-8"?>
    2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    3     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    4     xmlns:owl="http://www.w3.org/2002/07/owl#"
    5     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    6   <xsl:output method="html"/>
    7   <xsl:variable name="title" select="/rdf:RDF/owl:Ontology/rdfs:label"/>
    8   <xsl:variable name="about" select="/rdf:RDF/owl:Ontology/@rdf:about"/>
    9   <xsl:variable name="priorVersion" select="/rdf:RDF/owl:Ontology/owl:priorVersion/@rdf:resource"/>
   10   <xsl:template match="/rdf:RDF">
   11     <html>
   12       <head>
   13         <title><xsl:value-of select="$title"/></title>
   14         <style>
   15           h4 { margin-bottom: 0.25em; }
   16           body { font-family: sans-serif; }
   17           .about { font-family: monospace; margin-left: 1em; }
   18           .label { margin-left: 1em; font-style:italic; }
   19           .comment { margin-left: 1em; }
   20           .property { margin-left: 1em; }
   21           .version { margin-left: 1em; }
   22         </style>
   23       </head>
   24       <body>
   25         <h1><xsl:value-of select="$title"/></h1>
   26         <div class="about"><xsl:value-of select="$about"/></div>
   27         <xsl:for-each select="/rdf:RDF/owl:Ontology/rdfs:comment">
   28           <div class="comment"><xsl:value-of select="."/></div>
   29         </xsl:for-each>
   30         <xsl:if test="/rdf:RDF/owl:Ontology/owl:versionInfo and not(/rdf:RDF/owl:Ontology/owl:versionInfo = '')">
   31           <div class="version">Version: <xsl:value-of select="/rdf:RDF/owl:Ontology/owl:versionInfo"/></div>
   32         </xsl:if>
   33         <xsl:if test="/rdf:RDF/owl:Ontology/owl:priorVersion and not(/rdf:RDF/owl:Ontology/owl:priorVersion = '')">
   34           <div class="version">Prior version: <a>
   35             <xsl:attribute name="href"><xsl:value-of select="$priorVersion"/></xsl:attribute>
   36             <xsl:value-of select="$priorVersion"/></a>
   37           </div>
   38         </xsl:if>
   39 
   40       </body>
   41     </html>
   42   </xsl:template>
   43 
   44 </xsl:stylesheet>