Class XHTMLSerializer

  • All Implemented Interfaces:
    Poolable, Recyclable, Component, Configurable, LogEnabled, Serviceable, Serializer, SitemapOutputComponent, XMLConsumer, XMLConsumer, ContentHandler, LexicalHandler, Locator

    public class XHTMLSerializer
    extends XHTMLSerializer
    implements LogEnabled, Serviceable
    Inherits from cocoon's serializers block XHTMLSerializer.

    The following configuration can be used:

     <omit-xml-declaration>yes|no</omit-xml-declaration>
     <tags-to-collapse>input,meta</tags-to-collapse>
     <namespace-allowed></namespace-allowed>
     <namespace-allowed>http://www.w3.org/XML/1998/namespace</namespace-allowed>
     <namespace-allowed>http://www.w3.org/1999/xhtml</namespace-allowed>
     
    Empty tags are not collapsed except the ones configured with tags-to-collapse.
    If there is no such configuration, default tags to collaspe are:
    • input
    • img
    • meta
    • link
    • hr
    • br
    Namespace tags and attributes are filtered to product valid XHTML. This is configureable using namespace-allowed, by default the only following namespaces are allowed:
    • "" (empty namespace)
    • "http://www.w3.org/XML/1998/namespace"
    • "http://www.w3.org/1999/xhtml"
    • "http://www.w3.org/2000/svg"
    • "http://www.w3.org/1998/Math/MathML"
    Content of script tags will be exported in a single comment.

    omit-xml-declaration is set to yes by default for compatibility purpose (IE 6). If omit-xml-declaration is set to no, Content-Type meta tag will be dropped if present.

    Since:
    1.1.5 this serializer is JAXP compliant with the processing instruction javax.xml.transform.*-output-escaping processing.
    See Also:
    Result