[PATCH] ETL: Added repair XSLT script to rename value of GEWAESSER attribute 'Untere Havel-Wasserstraße (UHW)' with 'Havel'

Wald Commits scm-commit at wald.intevation.org
Mon Oct 7 11:13:47 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1381137220 -7200
# Node ID b8d6aac3acf2809590c7ed7f1468814a66a11844
# Parent  5783bd29de8a1298a377234318c6ee50cc472587
ETL: Added repair XSLT script to rename value of GEWAESSER attribute 'Untere Havel-Wasserstraße (UHW)' with 'Havel'.

diff -r 5783bd29de8a -r b8d6aac3acf2 etl/doc/havel.xsl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etl/doc/havel.xsl	Mon Oct 07 11:13:40 2013 +0200
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <xsl:output method="xml"/>
+
+    <xsl:template match="/DIPSFLYS/STATIONEN/PEGELSTATION[@GEWAESSER='Untere Havel-Wasserstraße (UHW)']">
+        <PEGELSTATION>
+            <xsl:attribute name="GEWAESSER">Havel</xsl:attribute>
+            <xsl:apply-templates select="@*[local-name() != 'GEWAESSER']"/>
+            <xsl:apply-templates select="node()"/>
+        </PEGELSTATION>
+    </xsl:template>
+
+    <xsl:template match="@*|node()">
+       <xsl:copy>
+          <xsl:apply-templates select="@*|node()"/>
+       </xsl:copy>
+    </xsl:template>
+
+</xsl:stylesheet>


More information about the Dive4elements-commits mailing list