1<xsl:stylesheet version = '1.0' 2 xmlns:xsl='http://www.w3.org/1999/XSL/Transform' 3 xmlns:nid3="http://www.semanticdesktop.org/ontologies/2007/05/10/nid3#" 4 xmlns:nfo="http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#" 5 xmlns:nmo="http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#" 6 xmlns:nie="http://www.semanticdesktop.org/ontologies/2007/01/19/nie#" 7 xmlns:exif="http://www.kanzaki.com/ns/exif#" 8 xmlns:nao="http://www.semanticdesktop.org/ontologies/2007/08/15/nao#" 9 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 10 xmlns:protege="http://protege.stanford.edu/system#" 11 xmlns:dcterms="http://purl.org/dc/terms/" 12 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 13 xmlns:ncal="http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#" 14 xmlns:xsd="http://www.w3.org/2001/XMLSchema#" 15 xmlns:nrl="http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#" 16 xmlns:pimo="http://www.semanticdesktop.org/ontologies/2007/11/01/pimo#" 17 xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" 18 xmlns:tmo="http://www.semanticdesktop.org/ontologies/2008/05/20/tmo#" 19 xmlns:dc="http://purl.org/dc/elements/1.1/" 20 xmlns:nco="http://www.semanticdesktop.org/ontologies/2007/03/22/nco#" 21 xmlns:nexif="http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#"> 22 23<xsl:output method="text" /> 24 25<xsl:template name="predicate-of"> 26 <xsl:param name="about"/> 27 <xsl:choose> 28 <xsl:when test="substring-after($about, '/')"> 29 <xsl:call-template name="predicate-of"> 30 <xsl:with-param name="about" select="substring-after($about, '/')"/> 31 </xsl:call-template> 32 </xsl:when> 33 <xsl:otherwise> 34 <xsl:choose> 35 <xsl:when test="substring-after($about, '#')"> 36 <xsl:if test="substring-before($about, '#') != 'XMLSchema'"><xsl:value-of select="substring-before($about, '#')"/>:</xsl:if><xsl:value-of select="substring-after($about, '#')"/> 37 </xsl:when> 38 <xsl:otherwise>dc:<xsl:value-of select="$about"/></xsl:otherwise> 39 </xsl:choose> 40 </xsl:otherwise> 41 </xsl:choose> 42</xsl:template> 43 44<xsl:template match="rdf:RDF"> 45<xsl:for-each select="rdfs:Class"> 46 47[<xsl:call-template name="predicate-of"><xsl:with-param name="about"><xsl:value-of select="@rdf:about"/></xsl:with-param></xsl:call-template>]<xsl:if test="rdfs:label"> 48DisplayName=<xsl:value-of select="rdfs:label"/> 49</xsl:if> 50<xsl:if test="rdfs:subClassOf"> 51SuperClasses=<xsl:for-each select="rdfs:subClassOf"> 52<xsl:if test="@rdf:resource"> 53<!-- xsl:if test="substring-after(@rdf:resource, '#') != 'Resource'" //--> 54<xsl:call-template name="predicate-of"><xsl:with-param name="about"><xsl:value-of select="@rdf:resource"/></xsl:with-param></xsl:call-template>;</xsl:if><!-- /xsl:if //--> 55<xsl:for-each select="rdfs:Class"><xsl:call-template name="predicate-of"><xsl:with-param name="about"><xsl:value-of select="@rdf:about"/></xsl:with-param></xsl:call-template>;</xsl:for-each></xsl:for-each></xsl:if> 56<xsl:if test="rdfs:comment"> 57Description=<xsl:value-of select="rdfs:comment"/></xsl:if> 58</xsl:for-each> 59</xsl:template> 60</xsl:stylesheet> 61 62