cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikael Geijer <>
Subject XHTML serializer bug?
Date Thu, 15 Apr 2004 11:17:40 GMT
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.



 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"
 <title>Sök kontakt på inmatat värde</title>
 <titleshort>Sök på värde</titleshort>
   <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. 
     <input type="submit" name="sendbutton" value="Sök"/>

And here's the xsl:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<xsl:stylesheet version="1.0" 
<xsl:import href="chtmlutil.xsl"/>

<xsl:param name="contextPath"/>

<xsl:template match="page">
      <title><xsl:value-of select="titleshort"/></title>
      <link rel="stylesheet" href="xhtmlmpstyle.css" type="text/css" />
<xsl:template match="content">

<xsl:template match="form">
  <form action="{@target}" method="post">

<xsl:template match="input">
  <xsl:value-of select="@label"/> <input type="{@type}" name="{@name}" 
value="{@value}" maxlength="8"/><br/>

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

<xsl:template match="*">


=- Mikael Geijer, nufort HB (, Oebb AB (
=- mobile: +46 70 7455239 office +46 70 7455239
=- email:
=- snail:  Kyrklunden 8, 122 32 Enskede, Sweden

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message