XML schema |
http://dataconnector.eea.europa.eu/airqualityexport/eoe/schema/nrtairquality.xsd
|
---|---|
Output type | RDF |
Description | RDF |
XSL file | eoe-to-rdf.xsl (Last modified: 21 Mar 2011 16:19 ) |
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dct="http://purl.org/dc/terms/" xmlns="http://rdfdata.eionet.europa.eu/airbase/schema/" version="1.0"> <xsl:output method="xml" indent="yes" /> <!-- $Id: eoe-to-rdf.xsl 9432 2011-03-21 13:59:38Z roug $ For schema: http://dataconnector.eea.europa.eu/airqualityexport/eoe/schema/nrtairquality.xsd --> <xsl:template match="Root"> <rdf:RDF> <rdf:Description rdf:about=""> <version><xsl:value-of select="Header/version"/></version> <dct:title><xsl:value-of select="Header/name"/></dct:title> <organisationUrl><xsl:value-of select="Header/organisatio_url"/></organisationUrl> <contact><xsl:value-of select="Header/contact"/></contact> <timezone><xsl:value-of select="Header/timezone"/></timezone> <datatype><xsl:value-of select="Header/datatype"/></datatype> </rdf:Description> <xsl:apply-templates select="Data"/> </rdf:RDF> </xsl:template> <xsl:template match="Data|measurements"> <xsl:apply-templates/> </xsl:template> <xsl:template match="station"> <xsl:apply-templates select="measurements"/> </xsl:template> <xsl:template match="measurement"> <xsl:element name="Measurement"> <xsl:attribute name="rdf:ID"><xsl:value-of select="generate-id()"/></xsl:attribute> <station><xsl:value-of select="../../code"/></station> <fromStation><xsl:attribute name="rdf:resource">http://rdfdata.eionet.europa.eu/airbase/stations/<xsl:value-of select="../../code"/></xsl:attribute></fromStation> <component><xsl:value-of select="@component"/></component> <start><xsl:value-of select="@start"/></start> <stop><xsl:value-of select="@stop"/></stop> <value rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal"><xsl:value-of select="value"/></value> <type><xsl:value-of select="value/@type"/></type> <rdfs:label><xsl:value-of select="../../code"/> (<xsl:value-of select="@start"/>) <xsl:value-of select="@component"/>:<xsl:value-of select="value"/></rdfs:label> </xsl:element> </xsl:template> <xsl:template match="*"> <xsl:element name="{local-name()}"> <xsl:value-of select="."/> </xsl:element> </xsl:template> <xsl:template match="*" mode="ignore"/> </xsl:stylesheet>
European Environment Agency
Kgs. Nytorv 6, DK-1050 Copenhagen K, Denmark