You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by mat t <ma...@remail.net> on 2001/03/18 16:40:07 UTC
Default behavior not working with cocoon
Default behavior doesn't works with cocoon:
If I use a plain html file on the server with:
<HTML>
<HEAD>
<META content="snapshot" name="save" >
<STYLE> .saveSnapshot
{BEHAVIOR:url(#default#savesnapshot);}
</STYLE>
</HEAD>
<BODY>
<FORM id="Expense_Form" class="saveSnapshot">
Date:<INPUT type="text" name=date >
</FORM>
</BODY>
</HTML>
Let's say I fill the date textbox with "2/3/2001" on the browser, just by going to "save as" and saving the file to my computer, it automatically updates the html to:
<INPUT type="text" name=date value="2/3/2001">
If I do this with cocoon (xml and xsl) it doesn't work, why?
Here is my XML and XSL:
-------------------XML--------------------
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<?cocoon-process type="xslt"?>
<textbox name="Date"></textbox>
-------------------------------------------
--------------------XSL--------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:processing-instruction name="cocoon-format">type="text/html"</xsl:processing-instruction>
<html>
<head>
<META content="snapshot" name="save"/>
<STYLE> .saveSnapshot
{BEHAVIOR:url(#default#savesnapshot);}
</STYLE>
</head>
<body bgcolor="#FFFFFF">
<form name="form1" class="saveSnapshot">
<xsl:apply-templates/>
</form>
</body>
</html>
</xsl:template>
<xsl:template match="textbox">
<xsl:value-of select="@name"/>
<input type="text" name="date"/>
</xsl:template>
</xsl:stylesheet>
-----------------------------------------
Does cocoon have a way of saving forms to client side?
Thanks,
Matt
_____________________________________________________________
Pick up your email anywhere in the world ---> http://www.remail.net
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>