<!-- 

combineSkosOntology.xsl Bob DuCharme 8/08

Combine and streamline SKOS core and extension vocabulary. No warrantee 
expressed or implied. 

Run with libxslt like this:
  xsltproc -o skoscombo.rdf combineSkosOntology.xsl 2006-04-18.rdf 

-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:skos="http://www.w3.org/2004/02/skos/core#"
                xmlns:owl="http://www.w3.org/2002/07/owl#"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                version="1.0">

  <xsl:strip-space elements="*"/>
  <xsl:output indent="yes"/>

  <xsl:template match="rdf:RDF">
    <rdf:RDF>
      <xsl:apply-templates/>
      <xsl:apply-templates select="document('extensions.rdf')" mode="import"/>
    </rdf:RDF>
  </xsl:template>

  <!-- When importing the other RDF file, we don't want its rdf:RDF
       document element. -->
  <xsl:template match="rdf:RDF" mode="import">
    <xsl:apply-templates/>
  </xsl:template>

  <!-- Elements to suppress. changeNote elements create the genidNN
       instances that clutter up the SWOOP Instance list. -->
  <xsl:template match="skos:example | owl:DeprecatedClass |
                       owl:DeprecatedProperty | skos:changeNote"/>

  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>


</xsl:stylesheet>
