org.apache.cocoon.components.serializers.encoding
Class XHTMLEncoder

java.lang.Object
  extended byorg.apache.cocoon.components.serializers.encoding.AbstractCharset
      extended byorg.apache.cocoon.components.serializers.encoding.CompiledCharset
          extended byorg.apache.cocoon.components.serializers.encoding.CompiledEncoder
              extended byorg.apache.cocoon.components.serializers.encoding.XMLEncoder
                  extended byorg.apache.cocoon.components.serializers.encoding.XHTMLEncoder
All Implemented Interfaces:
Charset, Encoder, Verifier
Direct Known Subclasses:
HTMLEncoder

public class XHTMLEncoder
extends XMLEncoder

Version:
CVS $Id: XHTMLEncoder.java 30941 2004-07-29 19:56:58Z vgritsenko $
Author:
Pier Fumagalli, February 2003

Field Summary
 
Fields inherited from class org.apache.cocoon.components.serializers.encoding.CompiledCharset
encoding
 
Constructor Summary
  XHTMLEncoder()
          Create a new instance of this XHTMLEncoder.
protected XHTMLEncoder(String name)
          Create a new instance of this XHTMLEncoder.
 
Method Summary
protected  boolean compile(char c)
          Return true or false wether this encoding can encode the specified character or not.
 char[] encode(char c)
          Return an array of characters representing the encoding for the specified character.
 
Methods inherited from class org.apache.cocoon.components.serializers.encoding.CompiledCharset
allows, compile
 
Methods inherited from class org.apache.cocoon.components.serializers.encoding.AbstractCharset
equals, equals, getAliases, getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.components.serializers.encoding.Verifier
allows
 

Constructor Detail

XHTMLEncoder

public XHTMLEncoder()
Create a new instance of this XHTMLEncoder.


XHTMLEncoder

protected XHTMLEncoder(String name)
Create a new instance of this XHTMLEncoder.

Parameters:
name - A name for this Encoding.
Throws:
NullPointerException - If one of the arguments is null.
Method Detail

compile

protected boolean compile(char c)
Return true or false wether this encoding can encode the specified character or not.

This method will return true for the following character range:
#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]

Overrides:
compile in class XMLEncoder
See Also:
W3C XML 1.0

encode

public char[] encode(char c)
Return an array of characters representing the encoding for the specified character.

Specified by:
encode in interface Encoder
Overrides:
encode in class XMLEncoder


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.