org.enhydra.xml.xmlc.dom.lazydom
Class PreFormatter

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.dom.lazydom.PreFormatter

class PreFormatter
extends Object

Create pre-formatted text for inclusion in template DOM. Save's overhead of formatting the text. This adds character entity references for CharacterData nodes and formats the entire opening tag, with attributes, for elements. The default encoding is used to determine if this is an 7, 8, or 16 bit encoding, and substituting character references as needed.


Constructor Summary
PreFormatter(XMLCDocument xmlcDoc)
          Constructor.
 
Method Summary
 void createOutputOptionsCodeGenerator(String varName, JavaCode code)
          Generate code to recreate the output options used to format this code.
 String getMIMEEncoding()
          Get the encoding being used for the preformatted text.
 String preFormatNode(Node node)
          Get pre-formatted text for a node.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreFormatter

public PreFormatter(XMLCDocument xmlcDoc)
Constructor.
Method Detail

preFormatNode

public String preFormatNode(Node node)
Get pre-formatted text for a node.
Returns:
The text, of null if none is approriate for this node type.

getMIMEEncoding

public String getMIMEEncoding()
Get the encoding being used for the preformatted text.

createOutputOptionsCodeGenerator

public void createOutputOptionsCodeGenerator(String varName,
                                             JavaCode code)
Generate code to recreate the output options used to format this code.


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.