ivelin 2002/10/29 05:43:40
Modified: src/webapp/samples/xmlform/stylesheets wizard2html.xsl
Log:
minor update - formatting
Revision Changes Path
1.7 +131 -149
xml-cocoon2/src/webapp/samples/xmlform/stylesheets/wizard2html.xsl
Index: wizard2html.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/webapp/samples/xmlform/stylesheets/wizard2html.xsl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- wizard2html.xsl 28 Sep 2002 19:43:34 -0000 1.6
+++ wizard2html.xsl 29 Oct 2002 13:43:40 -0000 1.7
@@ -11,20 +11,14 @@
author: Simon Price <[EMAIL PROTECTED]>, September 2002
-->
-
-<xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002"
- exclude-result-prefixes="xalan"
->
-
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002"
+ exclude-result-prefixes="xalan" >
<xsl:template match="document">
<html>
<head>
- <title>XMLForm - Cocoon Feedback Wizard</title>
- <style type="text/css">
- <![CDATA[
+ <title>XMLForm - Cocoon Feedback Wizard</title>
+ <style type="text/css"> <![CDATA[
H1{font-family : sans-serif,Arial,Tahoma;color :
white;background-color : #0086b2;}
BODY{font-family : sans-serif,Arial,Tahoma;color :
black;background-color : white;}
B{color : white;background-color : blue;}
@@ -42,154 +36,142 @@
.sub-table { border: none; }
.button { background-color: #FFFFFF; color: #000099; border: 1px solid
#666666; width: 70px; }
.plaintable { border: 0px inset black;border: 0px inset black; width:
100%; }
- ]]>
- </style>
+ ]]> </style>
</head>
<body>
- <xsl:apply-templates />
+ <xsl:apply-templates />
</body>
</html>
</xsl:template>
-
<xsl:template match="xf:form">
- <xf:form method="post">
- <xsl:copy-of select="@*" />
- <br/><br/><br/><br/>
- <table align="center" border="0">
- <tr>
- <td align="center" colspan="3">
- <h1>
- <xsl:value-of select="xf:caption"/>
- <hr/>
- </h1>
- </td>
- </tr>
- <xsl:if test="count(error/xf:violation) > 0">
- <tr>
- <td align="left" colspan="3" class="{error/xf:violation[1]/@class}">
- <p>
- * There are
- [<b><xsl:value-of select="count(error/xf:violation)"/></b>]
- errors. Please fix these errors and submit the form again.
- </p>
- <p>
- <xsl:variable name="localViolations" select=".//xf:*[
child::xf:violation ]"/>
- <xsl:for-each
- select="error/xf:violation">
- <xsl:variable name="eref" select="./@ref"/>
- <xsl:if test="count ($localViolations[ @ref=$eref ]) = 0">
- *
- <xsl:value-of select="." />
- <br/>
- </xsl:if>
- </xsl:for-each>
- </p>
- <p/>
- </td>
- </tr>
- </xsl:if>
-
- <xsl:for-each select="*[name() != 'xf:submit']">
- <xsl:choose>
- <xsl:when test="name() = 'error'"/>
- <xsl:when test="name() = 'xf:caption'"/>
- <xsl:when test="xf:*">
- <xsl:apply-templates select="."/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <tr>
- <td align="center" colspan="3">
- <xsl:for-each select="*[name() = 'xf:submit']">
- <xsl:copy-of select="." />
- <xsl:text> </xsl:text>
- </xsl:for-each>
- </td>
- </tr>
- </table>
- </xf:form>
+ <xf:form method="post">
+ <xsl:copy-of select="@*" />
+ <br/>
+ <br/>
+ <br/>
+ <br/>
+ <table align="center" border="0">
+ <tr>
+ <td align="center" colspan="3">
+ <h1>
+ <xsl:value-of
select="xf:caption"/>
+ <hr/>
+ </h1>
+ </td>
+ </tr>
+ <xsl:if test="count(error/xf:violation) > 0">
+ <tr>
+ <td align="left" colspan="3"
+
class="{error/xf:violation[1]/@class}">
+ <p>* There are
[<b><xsl:value-of
+
select="count(error/xf:violation)"/></b>]
+ errors. Please fix
these errors and submit the
+ form again.</p>
+ <p>
+ <xsl:variable
name="localViolations"
+
select=".//xf:*[ child::xf:violation ]"/>
+ <xsl:for-each
select="error/xf:violation">
+ <xsl:variable
name="eref" select="./@ref"/>
+ <xsl:if
+
test="count ($localViolations[ @ref=$eref ]) = 0"
+ >*
<xsl:value-of select="." /> <br/> </xsl:if>
+ </xsl:for-each>
+ </p>
+ <p/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:for-each select="*[name() != 'xf:submit']">
+ <xsl:choose>
+ <xsl:when test="name() = 'error'"/>
+ <xsl:when test="name() =
'xf:caption'"/>
+ <xsl:when test="xf:*">
+ <xsl:apply-templates
select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <tr>
+ <td align="center" colspan="3">
+ <xsl:for-each select="*[name() =
'xf:submit']">
+ <xsl:copy-of select="." />
+ <xsl:text>
+ </xsl:text>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </table>
+ </xf:form>
</xsl:template>
-
<xsl:template match="xf:repeat">
- <tr width="100%">
- <td colspan="3" width="100%">
- <table class="repeat">
- <xsl:apply-templates select="*"/>
- </table>
- </td>
- </tr>
- </xsl:template>
-
+ <tr width="100%">
+ <td colspan="3" width="100%">
+ <table class="repeat">
+ <xsl:apply-templates select="*"/>
+ </table>
+ </td>
+ </tr>
+ </xsl:template>
<xsl:template match="xf:group">
- <tr width="100%">
- <td width="100%" colspan="2">
- <table class="group" border="0">
- <tr>
- <td align="left">
- <xsl:value-of select="xf:caption" />
- </td>
- </tr>
-
- <xsl:apply-templates select="*"/>
- </table>
- </td>
- </tr>
- </xsl:template>
-
+ <tr width="100%">
+ <td width="100%" colspan="2">
+ <table class="group" border="0">
+ <tr>
+ <td align="left">
+ <xsl:value-of
select="xf:caption" />
+ </td>
+ </tr>
+ <xsl:apply-templates select="*"/>
+ </table>
+ </td>
+ </tr>
+ </xsl:template>
<xsl:template match="xf:output[@form]">
- <div align="center">
- <hr width="30%"/>
- <br/>
- <font size="-1">
- <code>
- <xsl:value-of select="xf:caption" /> :
- <xsl:copy-of select="." />
- </code>
- </font>
- <br/>
- </div>
- </xsl:template>
-
- <xsl:template match="xf:caption"/>
-
- <xsl:template match="xf:*">
- <tr>
- <td align="left" valign="top">
- <p class="caption"><xsl:value-of select="xf:caption" /></p>
- </td>
- <td align="left">
- <table class="plaintable">
- <tr>
- <td align="left">
- <xsl:copy-of select="." />
- </td>
- <xsl:if test="xf:violation">
- <td align="left" class="{xf:violation[1]/@class}" width="100%">
- <xsl:for-each select="xf:violation">
- * <xsl:value-of select="." />
- <br/>
- </xsl:for-each>
- </td>
- </xsl:if>
- </tr>
- </table>
- <xsl:if test="xf:help">
- <div class="help"><xsl:value-of select="xf:help" /></div>
- <br />
- </xsl:if>
- </td>
- </tr>
- </xsl:template>
-
-
+ <div align="center">
+ <hr width="30%"/>
+ <br/>
+ <font size="-1">
+ <code> <xsl:value-of select="xf:caption" /> :
<xsl:copy-of
+ select="." /> </code>
+ </font>
+ <br/>
+ </div>
+ </xsl:template>
+ <xsl:template match="xf:caption"/>
+ <xsl:template match="xf:*">
+ <tr>
+ <td align="left" valign="top">
+ <p class="caption">
+ <xsl:value-of select="xf:caption" />
+ </p>
+ </td>
+ <td align="left">
+ <table class="plaintable">
+ <tr>
+ <td align="left">
+ <xsl:copy-of select="." />
+ </td>
+ <xsl:if test="xf:violation">
+ <td align="left"
class="{xf:violation[1]/@class}"
+ width="100%">
+ <xsl:for-each
select="xf:violation">*
+ <xsl:value-of
select="." /> <br/> </xsl:for-each>
+ </td>
+ </xsl:if>
+ </tr>
+ </table>
+ <xsl:if test="xf:help">
+ <div class="help">
+ <xsl:value-of select="xf:help" />
+ </div>
+ <br />
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:template>
<xsl:template match="*">
- <xsl:copy-of select="." />
+ <xsl:copy-of select="." />
</xsl:template>
-
</xsl:stylesheet>
-
-
-
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]