Hi all.
Fairly new to cocoon, finding it really powerful though. Using 2.1.4 on Linux w 1.4.2 JVM. I'm using the XHTML serializer (w the Transitional DTD) to create output for some smartphones. I'm having problems with unwanted additional form-attributes when the page is generated. An extra "selected" attribute with empty value is generated. The browser bails out on this. The generated xhtml ooks like:


<form selected="" action="do-login" method="post">

Is this a (known) bug? Is there any workaround? Been banging my head into the wall for some time know so any hints are highly apreciated.

Cheers

/Mikael




From sitemap: <map:when test="smartphone"> <map:transform src="style/{1}2xhtml.xsl"/> <map:transform type="encodeURL"/> <map:serialize type="xhtml"/>

Here's the (yes I know -static) XSP input:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp";
xmlns:xsp-request="http://apache.org/xsp/request/2.0";
xmlns:xsp-session="http://apache.org/xsp/session/2.0";>
<page>
<title>S�k kontakt p� inmatat v�rde</title>
<titleshort>S�k p� v�rde</titleshort>
<content>
<form target="valueSearch.html">
<input type="text" name="searchname" label="S�k p� namn. S�kv�rde:"/>
<input type="text" name="searchcompany" label="S�k p� f�retag. S�kv�rde:"/>
<input type="submit" name="sendbutton" value="S�k"/>
</form>
<linkbar/>
</content>
</page>
</xsp:page>


And here's the xsl:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>


<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:import href="chtmlutil.xsl"/>


<xsl:param name="contextPath"/>

<xsl:template match="page">
 <html>
   <head>
     <title><xsl:value-of select="titleshort"/></title>
     <link rel="stylesheet" href="xhtmlmpstyle.css" type="text/css" />
   </head>
   <body>
     <p>
      <xsl:apply-templates/>
     </p>
   </body>
 </html>
</xsl:template>

<xsl:template match="content">
 <xsl:apply-templates/>
</xsl:template>

<xsl:template match="form">
 <form action="[EMAIL PROTECTED]" method="post">
   <center>
     <xsl:apply-templates/>
   </center>
 </form>
</xsl:template>

<xsl:template match="input">
<xsl:value-of select="@label"/> <input type="[EMAIL PROTECTED]" name="[EMAIL PROTECTED]" value="[EMAIL PROTECTED]" maxlength="8"/><br/>
</xsl:template>


<xsl:template match="linkbar">
   <xsl:call-template name="chtmlmenu"/>
</xsl:template>

<xsl:template match="*">
 <!--NOOP-->
</xsl:template>

</xsl:stylesheet>

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=- Mikael Geijer, nufort HB (nufort.net), Oebb AB (oebb.net)
=- mobile: +46 70 7455239 office +46 70 7455239
=- email:  [EMAIL PROTECTED]
=- snail:  Kyrklunden 8, 122 32 Enskede, Sweden
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to