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<xsl:output method="text" /> 23 24<xsl:template name="predicate-of"> 25 <xsl:param name="about"/> 26 <xsl:choose> 27 <xsl:when test="substring-after($about, '/')"> 28 <xsl:call-template name="predicate-of"> 29 <xsl:with-param name="about" select="substring-after($about, '/')"/> 30 </xsl:call-template> 31 </xsl:when> 32 <xsl:otherwise> 33 <xsl:choose> 34 <xsl:when test="substring-after($about, '#')"> 35 <xsl:if test="substring-before($about, '#') != 'XMLSchema'"><xsl:value-of select="substring-before($about, '#')"/>:</xsl:if><xsl:value-of select="substring-after($about, '#')"/> 36 </xsl:when> 37 <xsl:otherwise>DC:<xsl:value-of select="$about"/></xsl:otherwise> 38 </xsl:choose> 39 </xsl:otherwise> 40 </xsl:choose> 41</xsl:template> 42<xsl:template match="rdf:RDF"> 43@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . 44@prefix foaf: <http://xmlns.com/foaf/0.1/> . 45@prefix owl: <http://www.w3.org/2002/07/owl#> . 46@prefix xsl: <http://www.w3.org/1999/XSL/Transform#> . 47@prefix nid3: <http://www.semanticdesktop.org/ontologies/2007/05/10/nid3#> . 48@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> . 49@prefix nmo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#> . 50@prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> . 51@prefix exif: <http://www.kanzaki.com/ns/exif#> . 52@prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> . 53@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 54@prefix protege: <http://protege.stanford.edu/system#> . 55@prefix dcterms: <http://purl.org/dc/terms/> . 56@prefix ncal: <http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#> . 57@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . 58@prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> . 59@prefix pimo: <http://www.semanticdesktop.org/ontologies/2007/11/01/pimo#> . 60@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> . 61@prefix tmo: <http://www.semanticdesktop.org/ontologies/2008/05/20/tmo#> . 62@prefix dc: <http://purl.org/dc/elements/1.1/> . 63@prefix nco: <http://www.semanticdesktop.org/ontologies/2007/03/22/nco#> . 64@prefix nexif: <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#> . 65 66<xsl:for-each select="rdfs:Class"> 67<xsl:variable name="about" select="@rdf:about"/> 68<xsl:variable name="pos" select="position()"/>_:a<xsl:value-of select="$pos"/><xsl:text> </xsl:text>a<xsl:text> </xsl:text><xsl:call-template name="predicate-of"><xsl:with-param name="about"><xsl:value-of select="@rdf:about"/></xsl:with-param></xsl:call-template><xsl:text> </xsl:text>. 69 70<xsl:for-each select="/rdf:RDF/rdf:Property/rdfs:domain[@rdf:resource=$about]"> 71<xsl:choose> 72<xsl:when test="substring-after(../rdfs:range/@rdf:resource, '#') = 'string'">_:a<xsl:value-of select="$pos"/><xsl:text> </xsl:text><xsl:call-template name="predicate-of"><xsl:with-param name="about"><xsl:value-of select="../@rdf:about"/></xsl:with-param></xsl:call-template><xsl:text> "stringly data for </xsl:text><xsl:call-template name="predicate-of"><xsl:with-param name="about"><xsl:value-of select="../@rdf:about"/></xsl:with-param></xsl:call-template><xsl:text>" . 73</xsl:text> 74</xsl:when> 75<xsl:otherwise> 76</xsl:otherwise> 77</xsl:choose> 78 79</xsl:for-each> 80 81</xsl:for-each> 82</xsl:template> 83</xsl:stylesheet> 84