View stylesheet

XML schemas http://www.eionet.europa.eu/schemas/boundingboxes.xsd
Output type RDF
Description Convert to RDF
XSL file boundaries2rdf.xsl (Last modified: 07 Feb 2011 16:37 )
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
      exclude-result-prefixes=""
      xmlns:eea="http://rdfdata.eionet.europa.eu/eea/ontology/">
    <xsl:output method="xml"/>

    <xsl:template match="/">
        <rdf:RDF>
            <xsl:apply-templates/>
        </rdf:RDF>
    </xsl:template>

    <xsl:template match="root">
        <xsl:for-each select="*">
            <xsl:element name="eea:BoundingBox">
                <xsl:attribute name="rdf:ID"><xsl:value-of select="generate-id()" /></xsl:attribute>
                <xsl:apply-templates/>
            </xsl:element>
        </xsl:for-each>
    </xsl:template>

    <xsl:template match="ISO_2DIGIT">
        <xsl:element name="eea:forCountry">
            <xsl:attribute name="rdf:resource">http://rdfdata.eionet.europa.eu/eea/countries/<xsl:value-of select="."/></xsl:attribute>
        </xsl:element>
        <xsl:element name="eea:isoCode"><xsl:value-of select="."/></xsl:element>
    </xsl:template>

    <xsl:template match="MIN_CNTRY_|CNT_ISO_2D"/>

    <xsl:template match="*">
        <xsl:element name="{concat('eea:',local-name())}"><xsl:value-of select="."/></xsl:element>
    </xsl:template>

</xsl:stylesheet>