You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axkit-dev@xml.apache.org by ma...@axkit.org on 2003/06/24 13:14:33 UTC
CVS update: AxKit-XSP-PerForm/stylesheets
Date: Tuesday June 24, 2003 @ 11:15
Author: matt
Update of /home/cvs/AxKit-XSP-PerForm/stylesheets
In directory ted.sergeant.org:/home/matt/Perl/AxKit-XSP-PerForm/stylesheets
Modified Files:
perform_html.xsl
Log Message:
Reformat paragraphs
Added onchange/onclick support
Added disabled support
Log:
PR:
Index: perform_html.xsl
===================================================================
RCS file: /home/cvs/AxKit-XSP-PerForm/stylesheets/perform_html.xsl,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -u -r1.7 -r1.8
--- perform_html.xsl 2002/11/05 22:45:47 1.7
+++ perform_html.xsl 2003/06/24 10:15:33 1.8
@@ -4,6 +4,22 @@
version="1.0"
>
+<!--
+This stylesheet is not meant to be used in isolation. Either use it as part
+of a pipeline (in which case uncomment the below default template for
+'*|@*'), or <xsl:import> or <xsl:include> it into your own stylesheet.
+-->
+
+<!-- Commented out for use in <xsl:import> rather than a pipeline -->
+<!--
+<xsl:template match="*|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+</xsl:template>
+-->
+
<xsl:template match="formerrors">
<xsl:apply-templates select="..//error"/>
</xsl:template>
@@ -25,7 +41,13 @@
name="{@name|name}{@index|index}"
value="{@value|value}"
size="{@width|width}"
- maxlength="{@maxlength|maxlength}" />
+ maxlength="{@maxlength|maxlength}">
+ <xsl:if test="@disabled or disabled"><xsl:attribute
+ name="disabled">disabled</xsl:attribute></xsl:if>
+ <xsl:if test="@onchange or onchange">
+ <xsl:attribute name="onchange"><xsl:value-of select="@onchange|onchange"/></xsl:attribute>
+ </xsl:if>
+ </input>
<xsl:apply-templates select="error"/>
</xsl:template>
@@ -35,7 +57,13 @@
name="{@name|name}{@index|index}"
value="{@value|value}"
size="{@width|width}"
- maxlength="{@maxlength|maxlength}" />
+ maxlength="{@maxlength|maxlength}">
+ <xsl:if test="@disabled or disabled"><xsl:attribute
+ name="disabled">disabled</xsl:attribute></xsl:if>
+ <xsl:if test="@onchange or onchange">
+ <xsl:attribute name="onchange"><xsl:value-of select="@onchange|onchange"/></xsl:attribute>
+ </xsl:if>
+ </input>
<xsl:apply-templates select="error"/>
</xsl:template>
@@ -45,6 +73,11 @@
name="{@name|name}{@index|index}"
value="{@value|value}">
<xsl:if test="@checked = 'checked' or checked = 'checked'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
+ <xsl:if test="@disabled or disabled"><xsl:attribute
+ name="disabled">disabled</xsl:attribute></xsl:if>
+ <xsl:if test="@onclick or onclick">
+ <xsl:attribute name="onclick"><xsl:value-of select="@onclick|onclick"/></xsl:attribute>
+ </xsl:if>
</input>
<xsl:apply-templates select="error"/>
</xsl:template>
@@ -53,7 +86,13 @@
<input
type="submit"
name="{@name|name}{@index|index}"
- value="{@value|value}" />
+ value="{@value|value}">
+ <xsl:if test="@disabled or disabled"><xsl:attribute
+ name="disabled">disabled</xsl:attribute></xsl:if>
+ <xsl:if test="@onclick or onclick">
+ <xsl:attribute name="onclick"><xsl:value-of select="@onclick|onclick"/></xsl:attribute>
+ </xsl:if>
+ </input>
<xsl:apply-templates select="error"/>
</xsl:template>
@@ -75,6 +114,11 @@
<xsl:template match="single_select">
<select name="{@name|name}{@index|index}">
+ <xsl:if test="@disabled or disabled"><xsl:attribute
+ name="disabled">disabled</xsl:attribute></xsl:if>
+ <xsl:if test="@onchange or onchange">
+ <xsl:attribute name="onchange"><xsl:value-of select="@onchange|onchange"/></xsl:attribute>
+ </xsl:if>
<xsl:apply-templates select="options/option"/>
</select>
<xsl:apply-templates select="error"/>
@@ -82,6 +126,11 @@
<xsl:template match="multi_select">
<select multiple="multiple" name="{@name|name}{@index|index}">
+ <xsl:if test="@disabled or disabled"><xsl:attribute
+ name="disabled">disabled</xsl:attribute></xsl:if>
+ <xsl:if test="@onclick or onclick">
+ <xsl:attribute name="onclick"><xsl:value-of select="@onclick|onclick"/></xsl:attribute>
+ </xsl:if>
<xsl:apply-templates select="options/option"/>
</select>
<xsl:apply-templates select="error"/>
@@ -90,6 +139,11 @@
<xsl:template match="textarea">
<textarea name="{@name|name}{@index|index}" cols="{@cols|cols}" rows="{@rows|rows}">
<xsl:if test="@wrap|wrap"><xsl:attribute name="wrap">physical</xsl:attribute></xsl:if>
+ <xsl:if test="@disabled or disabled"><xsl:attribute
+ name="disabled">disabled</xsl:attribute></xsl:if>
+ <xsl:if test="@onchange or onchange">
+ <xsl:attribute name="onchange"><xsl:value-of select="@onchange|onchange"/></xsl:attribute>
+ </xsl:if>
<xsl:value-of select="@value|value"/>
</textarea> <br />
<xsl:apply-templates select="error"/>