changeset 628:bfe33e658576

Added XSLT sheet to transform palette xml files into a style definition template used for mapfile generation. gnv-artifacts/trunk@703 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 23 Feb 2010 15:50:15 +0000
parents c009d8df53aa
children d08b9ba148c5
files gnv-artifacts/contrib/palette2polygonVM.xsl
diffstat 1 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/contrib/palette2polygonVM.xsl	Tue Feb 23 15:50:15 2010 +0000
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <xsl:output
+        method="text" version="1.0" encoding="UTF-8" omit-xml-declaration="no" />
+
+    <xsl:template match="*">
+        <xsl:apply-templates />
+    </xsl:template>
+
+    <xsl:template match="range">
+        CLASS
+            NAME "<xsl:value-of select="./@from" /> - <xsl:value-of select="./@to" />"
+            EXPRESSION ("[CLASS]"="<xsl:value-of select ="./@index" />")
+            STYLE
+                COLOR "<xsl:value-of select="./@rgb" />"
+            END
+        END
+    </xsl:template>
+
+</xsl:stylesheet>

http://dive4elements.wald.intevation.org