
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:office='urn:oasis:names:tc:opendocument:xmlns:office:1.0'
 xmlns:table='urn:oasis:names:tc:opendocument:xmlns:table:1.0'
 xmlns:text='urn:oasis:names:tc:opendocument:xmlns:text:1.0'
    xmlns:dd802="https://dd.eionet.europa.eu/namespace.jsp?ns_id=802" xmlns:dd821="https://dd.eionet.europa.eu/namespace.jsp?ns_id=821">
    <xsl:template match="dd802:UWWTPs"> <office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" office:version="1.0">	<office:automatic-styles>		<style:style style:name='cell1' style:family='table-cell' >			<style:text-properties fo:text-align='left' fo:font-size='10pt'/>		</style:style>		<style:style style:name='cell2' style:family='table-cell' >			<style:text-properties fo:text-align='center' fo:font-size='12pt' fo:font-style='italic'/>		</style:style>		<style:style style:name='Heading1' style:family='table-cell' >			<style:text-properties fo:text-align='left' fo:font-size='10pt' fo:font-style='italic' style:text-align-source='fix' fo:font-weight='bold'/>		</style:style>		<style:style style:name='Heading2' style:family='table-cell' >			<style:text-properties fo:text-align='center' fo:font-size='10pt' fo:font-weight='bold' />		</style:style>	</office:automatic-styles>	<office:body>	<office:spreadsheet>		<table:table>			<xsl:attribute name="table:name">UWWTPs</xsl:attribute>		<xsl:attribute name="schema-url">https://dd.eionet.europa.eu/GetSchema?id=TBL11757</xsl:attribute>		<xsl:attribute name="table-schema-urls">https://dd.eionet.europa.eu/GetSchema?id=TBL11757</xsl:attribute>			<table:table-columns>				<table:table-column table:default-cell-value-type='number' table:default-cell-style-name='cell1' >					<xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="count($elementsMetadata/element)"/></xsl:attribute>				</table:table-column>			</table:table-columns>			<!-- create header rows -->			<table:table-rows>				<xsl:apply-templates select="dd802:Row"/>			</table:table-rows>		</table:table>	</office:spreadsheet>	</office:body></office:document-content></xsl:template><xsl:template match="dd802:Row">		<xsl:if test="position()=1">			<xsl:call-template name="header"/>		</xsl:if>	<table:table-row><xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="row" select="."></xsl:variable>
<xsl:for-each xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="$elementsMetadata/element">
   <xsl:variable name="elemIdentifier">
      <xsl:value-of select="identifier"></xsl:value-of>
   </xsl:variable>
   <xsl:variable name="multiValueSeparator">
      <xsl:call-template name="getSeparator">
         <xsl:with-param name="element" select="$elemIdentifier"></xsl:with-param>
      </xsl:call-template>
   </xsl:variable>
   <table:table-cell xmlns:table="http://openoffice.org/2000/table">
      <text:p xmlns:text="http://openoffice.org/2000/text">
         <xsl:choose>
            <xsl:when test="count($row/*[local-name()= $elemIdentifier])=0 or string-join($row/*[local-name()= $elemIdentifier ],'')=''"></xsl:when>
            <xsl:otherwise>
               <xsl:value-of select="string-join($row/*[local-name()= $elemIdentifier ],$multiValueSeparator)"></xsl:value-of>
            </xsl:otherwise>
         </xsl:choose>
      </text:p>
   </table:table-cell>
</xsl:for-each>	</table:table-row></xsl:template><!--   template for building table cells with values --><!--  a named template, which creates the table header row --><xsl:template name="header">	<table:table-header-rows>		<table:table-row  table:default-cell-value-type='string' table:default-cell-style-name='Heading1' >
<xsl:for-each xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="$elementsMetadata/element">				<table:table-cell><text:p><xsl:value-of select="identifier" /></text:p> 
				</table:table-cell></xsl:for-each>		</table:table-row>	</table:table-header-rows></xsl:template>
<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="getSeparator">
   <xsl:param name="element" select="''"></xsl:param>
   <xsl:value-of select="','"></xsl:value-of>
</xsl:template>
<xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="elementsMetadata">
   <element>
      <elementid>101849</elementid>
      <identifier>uwwState</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101864</elementid>
      <identifier>repCode</identifier>
      <parentNS>null</parentNS>
      <type>string</type>
      <length>16</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101672</elementid>
      <identifier>aggCode</identifier>
      <parentNS>821</parentNS>
      <type>string</type>
      <length>32</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101809</elementid>
      <identifier>uwwCode</identifier>
      <parentNS>821</parentNS>
      <type>string</type>
      <length>32</length>
      <precision></precision>
   </element>
   <element>
      <elementid>94218</elementid>
      <identifier>uwwName</identifier>
      <parentNS>null</parentNS>
      <type>string</type>
      <length>255</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101826</elementid>
      <identifier>uwwCollectingSystem</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101829</elementid>
      <identifier>uwwDateClosing</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101844</elementid>
      <identifier>uwwHistorie</identifier>
      <parentNS>821</parentNS>
      <type>string</type>
      <length>4096</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101857</elementid>
      <identifier>uwwLatitude</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101851</elementid>
      <identifier>uwwLongitude</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101831</elementid>
      <identifier>uwwNUTS</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101848</elementid>
      <identifier>uwwLoadEnteringUWWTP</identifier>
      <parentNS>821</parentNS>
      <type>integer</type>
      <length>9</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101699</elementid>
      <identifier>uwwCapacity</identifier>
      <parentNS>821</parentNS>
      <type>integer</type>
      <length>9</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101657</elementid>
      <identifier>uwwPrimaryTreatment</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101658</elementid>
      <identifier>uwwSecondaryTreatment</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101842</elementid>
      <identifier>uwwOtherTreatment</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101846</elementid>
      <identifier>uwwNRemoval</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101833</elementid>
      <identifier>uwwPRemoval</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101853</elementid>
      <identifier>uwwUV</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101801</elementid>
      <identifier>uwwChlorination</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101761</elementid>
      <identifier>uwwOzonation</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101769</elementid>
      <identifier>uwwSandFiltration</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101679</elementid>
      <identifier>uwwMicroFiltration</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101685</elementid>
      <identifier>uwwOther</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101712</elementid>
      <identifier>uwwSpecification</identifier>
      <parentNS>821</parentNS>
      <type>string</type>
      <length>128</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101634</elementid>
      <identifier>uwwBOD5Perf</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101636</elementid>
      <identifier>uwwCODPerf</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101639</elementid>
      <identifier>uwwTSSPerf</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101696</elementid>
      <identifier>uwwNTotPerf</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101673</elementid>
      <identifier>uwwPTotPerf</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101666</elementid>
      <identifier>uwwOtherPerf</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101819</elementid>
      <identifier>uwwBadPerformance</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101816</elementid>
      <identifier>uwwAccidents</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101821</elementid>
      <identifier>uwwBadDesign</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101643</elementid>
      <identifier>uwwInformation</identifier>
      <parentNS>821</parentNS>
      <type>string</type>
      <length>4096</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101644</elementid>
      <identifier>uwwBODIncomingMeasured</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101645</elementid>
      <identifier>uwwBODIncomingCalculated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101647</elementid>
      <identifier>uwwBODIncomingEstimated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101662</elementid>
      <identifier>uwwCODIncomingMeasured</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101661</elementid>
      <identifier>uwwCODIncomingCalculated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101665</elementid>
      <identifier>uwwCODIncomingEstimated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101839</elementid>
      <identifier>uwwNIncomingMeasured</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101799</elementid>
      <identifier>uwwNIncomingCalculated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101804</elementid>
      <identifier>uwwNIncomingEstimated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101861</elementid>
      <identifier>uwwPIncomingMeasured</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101797</elementid>
      <identifier>uwwPIncomingCalculated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101815</elementid>
      <identifier>uwwPIncomingEstimated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101683</elementid>
      <identifier>uwwBODDischargeMeasured</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101828</elementid>
      <identifier>uwwBODDischargeCalculated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101835</elementid>
      <identifier>uwwBODDischargeEstimated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101855</elementid>
      <identifier>uwwCODDischargeMeasured</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101860</elementid>
      <identifier>uwwCODDischargeCalculated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101787</elementid>
      <identifier>uwwCODDischargeEstimated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101783</elementid>
      <identifier>uwwNDischargeMeasured</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101732</elementid>
      <identifier>uwwNDischargeCalculated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101718</elementid>
      <identifier>uwwNDischargeEstimated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101675</elementid>
      <identifier>uwwPDischargeMeasured</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101691</elementid>
      <identifier>uwwPDischargeCalculated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101767</elementid>
      <identifier>uwwPDischargeEstimated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101735</elementid>
      <identifier>uwwWasteWaterTreated</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101716</elementid>
      <identifier>uwwMethodWasteWaterTreated</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101868</elementid>
      <identifier>uwwWasteWaterReuse</identifier>
      <parentNS>821</parentNS>
      <type>decimal</type>
      <length>18</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101653</elementid>
      <identifier>uwwBeginLife</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101649</elementid>
      <identifier>uwwEndLife</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101807</elementid>
      <identifier>uwwHyperlink</identifier>
      <parentNS>821</parentNS>
      <type>string</type>
      <length>255</length>
      <precision></precision>
   </element>
   <element>
      <elementid>101869</elementid>
      <identifier>uwwInspireIDFacility</identifier>
      <parentNS>821</parentNS>
      <type></type>
      <length></length>
      <precision></precision>
   </element>
   <element>
      <elementid>101745</elementid>
      <identifier>uwwRemarks</identifier>
      <parentNS>821</parentNS>
      <type>string</type>
      <length>4096</length>
      <precision></precision>
   </element>
</xsl:variable></xsl:stylesheet>
