diff gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl @ 18:87002cbd194c

Static UI -integration an some refactoringwork done gnv/trunk@103 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 17 Sep 2009 14:30:16 +0000
parents
children 17c92f1f014b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl	Thu Sep 17 14:30:16 2009 +0000
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+                xmlns="http://www.w3.org/2002/xforms" 
+                xmlns:xform="http://www.w3.org/2002/xforms" 
+                xmlns:art="http://www.intevation.de/2009/artifacts">
+    <xsl:output method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="no"/>
+    
+    <xsl:template match="*[local-name() = 'select']">
+        <xsl:variable name="selectName" select="@ref"/>
+             <div id="timeseriesfilter">
+                <form id="{$selectName}Form" method="post">
+                   <fieldset>
+                    <legend><xsl:value-of select="@ref"/></legend>
+                    <select name="{$selectName}" multiple="multiple" size="6" disabled="disabled"> <xsl:apply-templates/></select>
+                    </fieldset>
+                </form>
+             </div> 
+    </xsl:template>
+    <xsl:template match="*[local-name() = 'select1']">
+        <xsl:variable name="selectName" select="@ref"/>
+            <div id="timeseriesfilter">
+                <form id="{$selectName}Form" method="post">
+                   <fieldset>
+                    <legend><xsl:value-of select="@ref"/></legend>
+                    <select name="{$selectName}" disabled="disabled"> <xsl:apply-templates/></select>
+                    </fieldset>
+                </form>
+             </div>
+    </xsl:template>
+    <xsl:template match="*[local-name() = 'item']">
+        <xsl:variable name="optionValue" select="*[local-name() = 'value']"/>
+        <xsl:choose>
+           <xsl:when test="@selected = 'true'">
+               <option value="{$optionValue}" selected="selected"><xsl:value-of select="*[local-name() = 'label']"></xsl:value-of></option>
+           </xsl:when>
+           <xsl:otherwise>
+               <option value="{$optionValue}"><xsl:value-of select="*[local-name() = 'label']"></xsl:value-of></option>
+           </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    
+    
+    <xsl:template match="*[local-name() = 'input']">
+        <xsl:variable name="inputValue" select="*[local-name() = 'value']"/>
+        <xsl:variable name="inputName" select="*[local-name() = 'label']"/>
+        <xsl:value-of select="*[local-name() = 'label']"/>: <input type="text" id="{$inputName}" name="{$inputName}" value="{$inputValue}" /><br/> 
+    </xsl:template>
+    
+    <xsl:template match="*[local-name() = 'label']">
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file

http://dive4elements.wald.intevation.org