Re: [xsl] generating HTML without 'Loose.dtd'

Subject: Re: [xsl] generating HTML without 'Loose.dtd'
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 15 Jun 2005 11:28:22 +0100
cocoon doesn't use the xslt engine's serialsation hints in xsl:output it
uses its own serialisers.

The default sitemap.xmap at the top level of your cocoon setup will have
something like this (depending on exactly which version of cocoon you
have)

    <map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" name="xhtml" ppool-max="64" src="org.apache.cocoon.serialization.XMLSerializer">
      <!--+
          | You can choose from Strict, Transitional, or Frameset XHTML.
          | For Strict XHTML set doctype to:
          |   <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
          |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
          | For Transitional XHTML set doctype to:
          |   <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public>
          |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system>
          | For Frameset XHTML set doctype to:
          |   <doctype-public>-//W3C//DTD XHTML 1.0 Frameset//EN</doctype-public>
          |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd</doctype-system>
          |
          | Default XHTML doctype in Cocoon is XHTML Strict. If you want to use more than one
          | XHTML DTD simultaneously, you can define several XHTML serializers.
          +-->
      <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
      <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
      <encoding>UTF-8</encoding>
    </map:serializer>

    <map:serializer logger="sitemap.serializer.xhtml" mime-type="application/xhtml+xml" name="xhtml11" pool-max="64" src="org.apache.cocoon.serialization.XMLSerializer">
      <doctype-public>-//W3C//DTD XHTML 1.1//EN</doctype-public>
      <doctype-system>http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</doctype-system>
      <encoding>UTF-8</encoding>
    </map:serializer>




Note that if you need to omit the SYSTEM ID you need to put your browser
into "quirks mode" rather than "standards mode" which means thatyour
html (or css) has some bad feature that does not work in a conformant
browser so you have to get the browser to emulate old bugs to get it to
work...

see

http://www.quirksmode.org/css/quirksmode.html

for example

So an alternative would be to fix your css so it works in standards
mode.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread