cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cocoon Wiki] Update of "HTML Serializer" by DavidLegg
Date Tue, 23 Sep 2008 16:27:30 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification.

The following page has been changed by DavidLegg:
http://wiki.apache.org/cocoon/HTML_Serializer

------------------------------------------------------------------------------
  ##language:en
  == HTML Serializer ==
  
- The secret to generating compliant 4.01 strict from Cocoon is to have the correct the 'HTML'
serializer declaration in the sitemap. 
+ The secret to generating compliant 4.01 strict from Cocoon is to have the correct doctype
declaration in the sitemap and to ensure the previous transformer does not have a default
namespace.
  
- === Example ===
+ If the transformer that feeds the HTMLSerializer has a statement similar to this:
+ 
+   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
+ 
+ Then you must remove the default namespace declaration like so:
+ 
+   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ 
+ If you do not do this then some elements such as <br> and <link> tags will have
a surplus '/' character appended and the html tag will have an illegal namespace attribute.
+ 
+ Note also that the HTMLSerializer does not make any attempt to clean up illegal tags or
attributes that may be fed to it.  So for example if you feed it with <img align="left"
src="picture.jpg"> then the 'align' attribute will be passed through even though its use
is deprecated in HTML 4.01 strict because it is considered a presentational element.
+ 
+ === Example of a HTML 4.01 strict serializer ===
  {{{
   <map:serializer logger="sitemap.serializer.html"
        mime-type="text/html"

Mime
View raw message