org.apache.cocoon.optional.servlet.components.sax.serializers
Class EncodingXHTMLSerializer

java.lang.Object
  extended by org.apache.cocoon.components.serializers.util.XHTMLSerializer
      extended by org.apache.cocoon.optional.servlet.components.sax.serializers.EncodingXHTMLSerializer
All Implemented Interfaces:
CachingPipelineComponent, Consumer, Finisher, PipelineComponent, SAXConsumer, SAXPipelineComponent, ContentHandler, LexicalHandler

public class EncodingXHTMLSerializer
extends org.apache.cocoon.components.serializers.util.XHTMLSerializer
implements SAXPipelineComponent, Finisher, SAXConsumer, CachingPipelineComponent

A pedantinc XHTML serializer encoding all recognized entities with their proper HTML names.

For configuration options of this serializer, please look at the org.apache.cocoon.components.serializers.util.EncodingSerializer, in addition to those, this serializer also support the specification of a default doctype. This default will be used if no document type is received in the SAX events, and can be configured in the following way:

 <map:serialize type="exhtml" doctype-default="mytype" />
 

The value mytype can be one of:

"none"
Not to emit any dococument type declaration.
"strict"
The XHTML 1.0 Strict document type.
"loose"
The XHTML 1.0 Transitional document type.
"frameset"
The XHTML 1.0 Frameset document type.

Version:
$Id: EncodingXHTMLSerializer.java 825425 2009-10-15 07:51:28Z reinhard $

Constructor Summary
EncodingXHTMLSerializer()
           
 
Method Summary
 CacheKey constructCacheKey()
           
 void finish()
          This method is called after pipeline run - regardless if the run was successful or an exception was thrown.
 String getContentType()
           
 void setConfiguration(Map<String,? extends Object> configuration)
          Pass component specific configuration parameters to the pipeline component in a generic way.
 void setOutputStream(OutputStream outputStream)
           
 void setup(Map<String,Object> parameters)
          The shared object map for this pipeline run.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
 

Constructor Detail

EncodingXHTMLSerializer

public EncodingXHTMLSerializer()
Method Detail

constructCacheKey

public CacheKey constructCacheKey()
Specified by:
constructCacheKey in interface CachingPipelineComponent

finish

public void finish()
Description copied from interface: PipelineComponent
This method is called after pipeline run - regardless if the run was successful or an exception was thrown.

Specified by:
finish in interface PipelineComponent

getContentType

public String getContentType()
Specified by:
getContentType in interface Finisher

setConfiguration

public void setConfiguration(Map<String,? extends Object> configuration)
Description copied from interface: PipelineComponent
Pass component specific configuration parameters to the pipeline component in a generic way. This is useful in environments that automatically assemble pipelines with their components and can't use the components constructors or setters.

Specified by:
setConfiguration in interface PipelineComponent
Parameters:
configuration - The Map of configuration parameters.

setOutputStream

public void setOutputStream(OutputStream outputStream)
Specified by:
setOutputStream in interface Finisher

setup

public void setup(Map<String,Object> parameters)
Description copied from interface: PipelineComponent
The shared object map for this pipeline run.

Specified by:
setup in interface PipelineComponent
Parameters:
parameters - A Map of parameters that are available to all PipelineComponents. This is a modifiable map that can be changed by this pipeline component.

toString

public String toString()


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.