You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ce...@delta.it on 2000/11/03 13:30:40 UTC
Submit
Hi all!
I tried to fine documentation but I can't get it and I miss something.
In an html form I have a submit declared as:
*****************************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html xmlns="http://www.w3.org/TR/xhtml1/strict" xmlns:fp
="http://apache.org/cocoon/XSP/FP/1.0">
<form action="db2.xml" method="post">
my text....
<input type="submit"></form>
**********************************end**********************
the db2.xml is this!
**********************************db2.xml**********************
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?xml-stylesheet href="db2.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>
<xsp:page
language="java"
xmlns:fp="http://apache.org/cocoon/XSP/FP/1.0"
xmlns:sql="http://www.apache.org/1999/SQL"
xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<page>
<form>
<title>
Post su tabella
</title>
</form>
</page>
</xsp:page>
************************end********************
and the db2.xsl is this!
***********************db2.xsl********************
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:fp="http://apache.org/cocoon/XSP/FP/1.0"
xmlns:request="http://www.apache.org/1999/XSP/Request"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:template match="page">
<html>
<fp:if-post>
<br/><br/>Post
</fp:if-post>
<fp:if-get>
<br/><br/>Get
</fp:if-get>
<xsl:apply-templates/>
</html>
</xsl:template>
</xsl:stylesheet>
***********************************end***************
I would like to show "Post" if I post, "Get" if I get. what I am doing
wrong?
TIA Cesare
Cesare
Re: Submit
Posted by Konstantin Piroumian <KP...@flagship.ru>.
Hi!
> ***********************db2.xsl********************
> <?xml version='1.0'?>
>
> <xsl:stylesheet version="1.0"
> xmlns:fp="http://apache.org/cocoon/XSP/FP/1.0"
> xmlns:request="http://www.apache.org/1999/XSP/Request"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns="http://www.w3.org/TR/xhtml1/strict">
>
>
> <xsl:template match="page">
> <html>
> <fp:if-post>
> <br/><br/>Post
> </fp:if-post>
> <fp:if-get>
> <br/><br/>Get
> </fp:if-get>
> <xsl:apply-templates/>
>
> </html>
> </xsl:template>
> </xsl:stylesheet>
> ***********************************end***************
You have no 'body' tag in your HTML- it can be the problem in non IE
browser.