|
<?xml version="1.0" encoding="utf-8"?>
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common"
|
|
|
|
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
|
|
xmlns:meta="urn:oio:ebst:diadem:metadata:1"
|
|
xmlns:sp="urn:oio:ebst:diadem:spildevandsplaner:1"
|
|
xmlns:kp="urn:oio:ebst:diadem:kommuneplan:1"
|
|
xmlns:lz="urn:oio:ebst:diadem:landzonetilladelse:1"
|
|
xmlns:vf="urn:oio:ebst:diadem:varmeforsyningsplaner:1"
|
|
xmlns:lp="urn:oio:ebst:diadem:lokalplan:1"
|
|
xmlns:eks="urn:ekstern:spildevandsplan"
|
|
xmlns:ogc="http://www.opengis.net/ogc"
|
|
xmlns:kms="http://schemas.kms.dk/wfs"
|
|
xmlns:gml="http://www.opengis.net/gml"
|
|
xmlns:ows="http://www.opengis.net/ows"
|
|
xmlns:tns="urn:oio:ebst:diadem:1"
|
|
xmlns:func="xalan://diadem.dirigent.plugin.helpers.XsltFunctions"
|
|
exclude-result-prefixes="xsl exsl msdata kms ows gml eks ogc">
|
|
|
|
<xsl:import href="../../XslTransformer/src/ResponseTemplates.xslt"/>
|
|
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
|
|
|
|
<!-- Main template -->
|
|
<xsl:template name="PlandataFinalResponse"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common"
|
|
xmlns:wfs="http://www.opengis.net/wfs"
|
|
xmlns:gml="http://www.opengis.net/gml"
|
|
xmlns:ows="http://www.opengis.net/ows"
|
|
xmlns:pdk="http://www.plansystemdk.dk"
|
|
|
|
xmlns:func="xalan://diadem.dirigent.plugin.helpers.XsltFunctions">
|
|
|
|
<xsl:param name="var_BaseElementName"/>
|
|
<xsl:param name="var_ElementName"/>
|
|
<xsl:param name="var_IndikatorName"/>
|
|
<xsl:param name="var_Theme"/>
|
|
<xsl:param name="var_SingleClassName"/>
|
|
<xsl:param name="var_nodeClassName" />
|
|
<xsl:param name="var_FeatureClassName"/>
|
|
<xsl:param name="var_TemaNamespace"/>
|
|
<xsl:param name="var_LandparcelName"/>
|
|
<xsl:param name="var_TemaNamespacePrefix"/>
|
|
<xsl:param name="collectionName"/>
|
|
<xsl:param name="elementPath"/>
|
|
<xsl:param name="var_nodePath"/>
|
|
<xsl:param name="var_finalAttribute"/>
|
|
<xsl:param name="var_queryStepIdentifier"/>
|
|
|
|
|
|
|
|
<xsl:variable name="var_content" select="QueryInput/Subject/Content" />
|
|
<xsl:variable name="var_key" select="$var_content/ReportElementKey"/>
|
|
|
|
<!--Common for all Spildevandsplan report elements-->
|
|
<xsl:variable name="plans">
|
|
<xsl:call-template name="Initial">
|
|
<xsl:with-param name="collectionPath" select="QueryInput/QueryResultStep[@QueryResultStepIdentifier= $var_queryStepIdentifier]/Multistep/IterationResponse/QueryResult/*[local-name()= $var_nodePath]"/>
|
|
<xsl:with-param name="collectionName" select="$collectionName"/>
|
|
<xsl:with-param name="elementPath" select="$elementPath"/>
|
|
<xsl:with-param name="var_finalAttribute" select="$var_finalAttribute"/>
|
|
</xsl:call-template>
|
|
</xsl:variable>
|
|
<QueryResult>
|
|
<xsl:choose>
|
|
<xsl:when test="count(//Error) >= 1">
|
|
<Error>
|
|
<ErrorCode>
|
|
<xsl:value-of select="QueryInput/QueryResultStep/Error/ErrorCode"/>
|
|
</ErrorCode>
|
|
<Content>
|
|
<Error>
|
|
<xsl:value-of select="QueryInput/QueryResultStep/Error/Content"/>
|
|
</Error>
|
|
</Content>
|
|
</Error>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
|
|
<xsl:variable name="var_firstPosition" select="'1'"/>
|
|
<xsl:variable name="var_secondPosition" select="'2'"/>
|
|
<xsl:variable name="var_thirdPosition" select="'3'"/>
|
|
|
|
<xsl:variable name="var_andreBestemmelseCount" select="'3'"/>
|
|
<xsl:variable name="var_anvendelseSpecifikCount" select="'14'"/>
|
|
<xsl:variable name="var_anvendelseSpecifikLokalplanerCount" select="'15'"/>
|
|
|
|
<xsl:element name="{$var_FeatureClassName}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="$var_key"/>
|
|
</xsl:attribute>
|
|
<xsl:variable name="report_element" >
|
|
<xsl:element name="{concat($var_nodeClassName, 'Samling')}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_secondPosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:for-each select="exsl:node-set($plans)//*[name()= $var_finalAttribute]" >
|
|
<xsl:element name="{$var_SingleClassName}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_thirdPosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:variable name="current" select="."/>
|
|
|
|
<xsl:variable name="var_DiademNamespacePrefix" select="'tns'"/>
|
|
<xsl:variable name="var_DiademNamespace" select="'urn:oio:ebst:diadem:1'"/>
|
|
<xsl:for-each select="$current/*[not(name()='matrikel')]" >
|
|
<xsl:choose>
|
|
<xsl:when test="name(.) = 'AndreBestemmelser'">
|
|
<xsl:variable name="var_currentPosition" select="position() + $var_thirdPosition"/>
|
|
<xsl:element name="{concat('AndreBestemmelse', 'Samling')}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:for-each select="./AndreBestemmelse">
|
|
<xsl:element name="{'AndreBestemmelse'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 1))"/>
|
|
</xsl:attribute>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'AndreBestemmelseKode'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 2))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AndreBestemmelseKode"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'AndreBestemmelseTekst'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 3))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AndreBestemmelseTekst"/>
|
|
</xsl:element>
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
</xsl:when>
|
|
<xsl:when test="name(.) = 'AnvendelseSpecifikker'">
|
|
<xsl:variable name="var_currentPosition" select="position() + $var_thirdPosition + $var_andreBestemmelseCount"/>
|
|
<xsl:element name="{concat('AnvendelseSpecifik', 'Samling')}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:for-each select="./AnvendelseSpecifik">
|
|
<xsl:element name="{'AnvendelseSpecifik'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 1))"/>
|
|
</xsl:attribute>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'AnvendelseSpecifikKode'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 2))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AnvendelseSpecifikKode"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'AnvendelseSpecifikTekst'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 3))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AnvendelseSpecifikTekst"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumEtageAreal'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 4))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumEtageAreal"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumEtageArealType'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 5))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumEtageArealType"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumEtageArealTypeTekst'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 6))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumEtageArealTypeTekst"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'BygningMaksimumRumfangsbestemmelse'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 7))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="BygningMaksimumRumfangsbestemmelse"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'BygningMaksimumRumfangsbestemmelseType'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 8))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="BygningMaksimumRumfangsbestemmelseType"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'BygningMaksimumRumfangsbestemmelseTypeTekst'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 9))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="BygningMaksimumRumfangsbestemmelseTypeTekst"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumTilladtBygningshoejde'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 10))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumTilladtBygningshoejde"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumEtage'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 11))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AndreBestemmelseTekst"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumBebyggelsesprocent'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 12))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumBebyggelsesprocent"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumBebyggelsesprocentType'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 13))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AndreBestemmelseTekst"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumBebyggelsesprocentTypeTekst'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 14))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumBebyggelsesprocentTypeTekst"/>
|
|
</xsl:element>
|
|
<xsl:if test="$var_FeatureClassName = 'Lokalplaner'">
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'GrundarealBebyggelsesProcent'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 15))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="GrundarealBebyggelsesProcent"/>
|
|
</xsl:element>
|
|
</xsl:if>
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
</xsl:when>
|
|
<xsl:when test="name(.) = 'LokalplanDelomraadeSamling'">
|
|
<xsl:variable name="delomraadePosition" select="position() + $var_thirdPosition + $var_andreBestemmelseCount + $var_anvendelseSpecifikLokalplanerCount"/>
|
|
<xsl:variable name="initialPosition" select="$delomraadePosition + 1"/>
|
|
<xsl:element name="{concat('LokalplanDelomraade', 'Samling')}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $delomraadePosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:for-each select="./LokalplanDelomraade">
|
|
<xsl:element name="LokalplanDelomraade" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $initialPosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:for-each select="./*">
|
|
<xsl:choose>
|
|
<xsl:when test="name(.) = 'matrikel'">
|
|
<xsl:variable name="var_currentPosition" select="position() + $initialPosition + $var_andreBestemmelseCount + $var_anvendelseSpecifikLokalplanerCount"/>
|
|
<xsl:element name="{concat($var_LandparcelName, 'Samling')}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:for-each select=".">
|
|
<xsl:element name="{$var_LandparcelName}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 1))"/>
|
|
</xsl:attribute>
|
|
<xsl:element name="{$var_DiademNamespacePrefix}:{'MatrikelnummerIdentifikator'}" namespace="{$var_DiademNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 2))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="matrikelid"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_DiademNamespacePrefix}:{'LandsejerlavKode'}" namespace="{$var_DiademNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 3))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="landsejerlavkode"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_DiademNamespacePrefix}:{'LandsejerlavNavn'}" namespace="{$var_DiademNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 4))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="landsejerlavnavn"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_DiademNamespacePrefix}:{'DaekketArealMaal'}" namespace="{$var_DiademNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 5))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="Intersection"/>
|
|
</xsl:element>
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
</xsl:when>
|
|
<xsl:when test="name(.) = 'AndreBestemmelser'">
|
|
<xsl:variable name="var_currentPosition" select="position() + $initialPosition"/>
|
|
<xsl:element name="{concat('AndreBestemmelse', 'Samling')}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:for-each select="./AndreBestemmelse">
|
|
<xsl:element name="{'AndreBestemmelse'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 1))"/>
|
|
</xsl:attribute>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'AndreBestemmelseKode'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 2))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AndreBestemmelseKode"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'AndreBestemmelseTekst'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 3))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AndreBestemmelseTekst"/>
|
|
</xsl:element>
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
</xsl:when>
|
|
<xsl:when test="name(.) = 'AnvendelseSpecifikker'">
|
|
<xsl:variable name="var_currentPosition" select="position() + $initialPosition + $var_andreBestemmelseCount"/>
|
|
<xsl:element name="{concat('AnvendelseSpecifik', 'Samling')}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:for-each select="./AnvendelseSpecifik">
|
|
<xsl:element name="{'AnvendelseSpecifik'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 1))"/>
|
|
</xsl:attribute>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'AnvendelseSpecifikKode'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 2))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AnvendelseSpecifikKode"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'AnvendelseSpecifikTekst'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 3))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AnvendelseSpecifikTekst"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumEtageAreal'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 4))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumEtageAreal"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumEtageArealType'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 5))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumEtageArealType"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumEtageArealTypeTekst'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 6))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumEtageArealTypeTekst"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'BygningMaksimumRumfangsbestemmelse'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 7))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="BygningMaksimumRumfangsbestemmelse"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'BygningMaksimumRumfangsbestemmelseType'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 8))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="BygningMaksimumRumfangsbestemmelseType"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'BygningMaksimumRumfangsbestemmelseTypeTekst'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 9))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="BygningMaksimumRumfangsbestemmelseTypeTekst"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumTilladtBygningshoejde'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 10))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumTilladtBygningshoejde"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumEtage'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 11))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AndreBestemmelseTekst"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumBebyggelsesprocent'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 12))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumBebyggelsesprocent"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumBebyggelsesprocentType'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 13))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="AndreBestemmelseTekst"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'MaksimumBebyggelsesprocentTypeTekst'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 14))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="MaksimumBebyggelsesprocentTypeTekst"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{'GrundarealBebyggelsesProcent'}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_currentPosition + 15))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="GrundarealBebyggelsesProcent"/>
|
|
</xsl:element>
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
</xsl:when>
|
|
<xsl:when test="not(name(.) = 'Intersection')">
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{name(.)}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , position() + $initialPosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="."/>
|
|
</xsl:element>
|
|
</xsl:when>
|
|
</xsl:choose>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:if test="not(name(.) = 'Intersection')">
|
|
<xsl:element name="{$var_TemaNamespacePrefix}:{name(.)}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , position() + $var_thirdPosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="."/>
|
|
</xsl:element>
|
|
</xsl:if>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:for-each>
|
|
<xsl:variable name="var_anvSpecFinalCount">
|
|
<xsl:choose>
|
|
<xsl:when test="$var_FeatureClassName = 'Lokalplaner'">
|
|
<xsl:value-of select="$var_anvendelseSpecifikLokalplanerCount"/>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:value-of select="$var_anvendelseSpecifikCount"/>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
<xsl:variable name="countContent">
|
|
<xsl:choose>
|
|
<xsl:when test="count(./AnvendelseSpecifikker) > 0 and count(./AndreBestemmelser) > 0">
|
|
<xsl:value-of select="$var_anvSpecFinalCount + $var_andreBestemmelseCount"/>
|
|
</xsl:when>
|
|
<xsl:when test="count(./AnvendelseSpecifikker) > 0">
|
|
<xsl:value-of select="$var_anvSpecFinalCount"/>
|
|
</xsl:when>
|
|
<xsl:when test="count(./AndreBestemmelser) > 0">
|
|
<xsl:value-of select="$var_andreBestemmelseCount"/>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:value-of select="0"/>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
<xsl:variable name="var_delomraadeCount">
|
|
<xsl:choose>
|
|
<xsl:when test="count(./LokalplanDelomraadeSamling) > 0">
|
|
<xsl:value-of select="70"/>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:value-of select="0"/>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
<xsl:variable name="pos">
|
|
<xsl:for-each select="$current/*">
|
|
<xsl:choose>
|
|
<xsl:when test="name(.) = 'matrikel'">
|
|
<xsl:value-of select="concat(position(), '-')"/>
|
|
</xsl:when>
|
|
</xsl:choose>
|
|
</xsl:for-each>
|
|
</xsl:variable>
|
|
<xsl:variable name="var_parcelPosition" select="substring-before($pos,'-') + $var_thirdPosition + $countContent + $var_delomraadeCount"/>
|
|
<xsl:element name="{concat($var_LandparcelName, 'Samling')}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_parcelPosition))"/>
|
|
</xsl:attribute>
|
|
<xsl:for-each select="$current/matrikel">
|
|
<xsl:element name="{$var_LandparcelName}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_parcelPosition + 1))"/>
|
|
</xsl:attribute>
|
|
<xsl:element name="{$var_DiademNamespacePrefix}:{'MatrikelnummerIdentifikator'}" namespace="{$var_DiademNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_parcelPosition + 2))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="matrikelid"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_DiademNamespacePrefix}:{'LandsejerlavKode'}" namespace="{$var_DiademNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_parcelPosition + 3))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="landsejerlavkode"/>
|
|
</xsl:element>
|
|
<xsl:element name="{$var_DiademNamespacePrefix}:{'LandsejerlavNavn'}" namespace="{$var_DiademNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_parcelPosition + 4))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="landsejerlavnavn"/>
|
|
</xsl:element>
|
|
<xsl:if test="Intersection">
|
|
<xsl:element name="{$var_DiademNamespacePrefix}:{'DaekketArealMaal'}" namespace="{$var_DiademNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, concat('/' , $var_parcelPosition + 5))"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="Intersection"/>
|
|
</xsl:element>
|
|
</xsl:if>
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:element name="{concat($var_FeatureClassName, 'Indikator')}" namespace="{$var_TemaNamespace}">
|
|
<xsl:attribute name="meta:key">
|
|
<xsl:value-of select="concat($var_key, '/1')"/>
|
|
</xsl:attribute>
|
|
<xsl:value-of select="boolean(count(exsl:node-set($report_element)//*[name()= $var_SingleClassName]) > 0)"/>
|
|
</xsl:element>
|
|
<xsl:copy-of select="$report_element"/>
|
|
</xsl:element>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</QueryResult>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="Spildevandsplan">
|
|
<xsl:copy>
|
|
<xsl:apply-templates select="@*"/>
|
|
<xsl:attribute name="id">
|
|
<xsl:number/>
|
|
</xsl:attribute>
|
|
<xsl:apply-templates select="node()"/>
|
|
</xsl:copy>
|
|
</xsl:template>
|
|
<xsl:template match="*">
|
|
<xsl:element name="{local-name()}">
|
|
<xsl:apply-templates select="@*|node()"/>
|
|
</xsl:element>
|
|
</xsl:template>
|
|
<xsl:template match="@*">
|
|
<xsl:attribute name="{local-name()}">
|
|
<xsl:value-of select="."/>
|
|
</xsl:attribute>
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|