You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ia...@jpmchase.com on 2006/01/13 18:02:56 UTC

Cocoon and

Dear List,

I have the following code in stylesheets/panelset2html.xsl:

<xsl:output method="html" version="4.01"
            doctype-public="-//W3C//DTD HTML 4.01 Frameset//EN"
            doctype-system="http://www.w3.org/TR/html4/frameset.dtd"/>

and the following in sitemap.xmap:

<map:match pattern="">
      <map:generate src="views/index.xml" type="jx">
            <map:parameter name="lenient-xpath" value="true"/>
      </map:generate>
      <map:transform src="stylesheets/panelset2html.xsl"/>
      <map:serialize type="html"/>
</map:match>

Based on this, I would expect the resulting HTML to containing the
following DOCTYPE:

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">

Instead, I am getting:

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Which MSIE doesn't seem to like in conjunction with the <frameset> element.

As far as I can tell, Cocoon is ignoring the <xsl:output>, and using
whatever is specified within the HTML Serializer configuration.

Is there a setting I can change to get Cocoon to respect the <xsl:output>,
or should I just configure a seperate instance of HTMLSerializer with the
appropriate doctype-public  and doctype-system values and use that instead
of the default serializer for frameset documents?


Thanks,
Ian

It's better to be hated for who you are
than loved for who you are not

Ian D. Stewart
Appl Dev Analyst-Advisory, DCS Automation
JPMorganChase Global Technology Infrastructure
Phone: (614) 244-2564
Pager: (888) 260-0078


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cocoon and

Posted by Sylvain Wallez <sy...@apache.org>.
ian.d.stewart@jpmchase.com wrote:
> Dear List,
>
> I have the following code in stylesheets/panelset2html.xsl:
>
> <xsl:output method="html" version="4.01"
>             doctype-public="-//W3C//DTD HTML 4.01 Frameset//EN"
>             doctype-system="http://www.w3.org/TR/html4/frameset.dtd"/>
>   

<snip/>
> As far as I can tell, Cocoon is ignoring the <xsl:output>, and using
> whatever is specified within the HTML Serializer configuration.
>   

That's right. To understand why, you have to consider the two parts of 
an XSL engine:
- the transformation part, defined by the xsl templates
- the serialization part, whose behavior is driven by <xsl:output>

The XSL transformer in Cocoon uses... the transformation part! As a 
consequence, the <xsl:output> instruction is ignored.

The HTML serializer uses the serialization part of the same XSL engine, 
using an identity transformation that converts SAX events to a byte 
stream. This is where the doctype settings are taken into account.

You therefore have to define a different "frameset-html" serializer to 
have the appropriate doctype.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://bluxte.net                     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org