view gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl @ 404:3a286c9e186c

Disabled step-back functionality. gnv/trunk@575 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 19 Jan 2010 16:34:28 +0000
parents 002a4d38c16d
children 02dc597b9b9a
line wrap: on
line source
<?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:param name="back-url"/>
    <xsl:param name="selectfis"/>

    <!-- start parsing document -->
    <xsl:template match="*">
        <table class="static">
            <xsl:apply-templates />
        </table>
    </xsl:template>

    
    <!-- match multi select boxes -->
    <xsl:template match="xform:select">
        <xsl:variable name="state" select="@art:state" />
        <tr>
            <!-- TODO Remove this link to render links to jump back in history
            <td class="historyback">
                <xsl:if test="$state != ''">
                    <a href="{$back-url}?target={$state}">[X]</a>
                </xsl:if>
            </td>
            -->
            <th class="parameter"><xsl:value-of select="xform:label" /></th>
            <td><xsl:apply-templates select="xform:choices" /></td>
        </tr>
    </xsl:template>


    <!-- match select boxes -->
    <xsl:template match="xform:select1">
        <xsl:variable name="state" select="@art:state" />
        <xsl:variable name="fis" select="@art:fis" />
        <tr>
            <!-- TODO Remove this link to render links to jump back in history
            <td class="historyback">
                <xsl:if test="$state != ''">
                    <a href="{$back-url}?target={$state}">[X]</a>
                </xsl:if>
                <xsl:if test="$fis">
                    <a href="{$selectfis}">[X]</a>
                </xsl:if>
            </td>
            -->
            <!-- TODO Remove when-clause which disables the fis select box .
                 TODO Just render the 'otherwise' part -->
            <xsl:choose>
                <xsl:when test="$fis">
                    <th></th>
                    <td></td>
                </xsl:when>
                <xsl:otherwise>
                    <th class="parameter"><xsl:value-of select="xform:label" /></th>
                    <td><xsl:apply-templates select="xform:choices" /></td>
                </xsl:otherwise>
            </xsl:choose>
        </tr>
    </xsl:template>

    
    <!-- match item list of select boxes or multi select boxes -->
    <xsl:template match="xform:choices">
        <table class="choices"><xsl:apply-templates select="xform:item" /></table>
    </xsl:template>


    <!-- match item of select boxes or multi select boxes -->
    <xsl:template match="xform:item">
        <tr>
            <td class="value"><xsl:value-of select="xform:label" /></td>
        </tr>
    </xsl:template>


    <!-- match group items -->
    <xsl:template match="xform:group">
        <xsl:variable name="state" select="@art:state" />
        <tr>
            <!-- TODO Remove this link to render links to jump back in history
            <td class="historyback">
                <xsl:if test="$state != ''">
                    <a href="{$back-url}?target={$state}">[X]</a>
                </xsl:if>
            </td>
            -->
            <th class="parameter"><xsl:value-of select="xform:label" /></th>
            <td>
                <table><xsl:apply-templates select="xform:input" /></table>
            </td>
        </tr>
    </xsl:template>


    <!-- match single group item -->
    <xsl:template match="xform:input">
        <tr>
            <td class="value"><xsl:value-of select="xform:label" />&#160;<xsl:value-of select="xform:value" /></td>
        </tr>
    </xsl:template>

</xsl:stylesheet>

http://dive4elements.wald.intevation.org