org.apache.xalan.xsltc.runtime
Class StringValueHandler

java.lang.Object
  extended by org.apache.xml.serializer.EmptySerializer
      extended by org.apache.xalan.xsltc.runtime.StringValueHandler
All Implemented Interfaces:
DOMSerializer, ExtendedContentHandler, ExtendedLexicalHandler, SerializationHandler, Serializer, XSLOutputAttributes, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.ErrorHandler, org.xml.sax.ext.DeclHandler, org.xml.sax.ext.LexicalHandler

public final class StringValueHandler
extends EmptySerializer


Field Summary
private  java.lang.StringBuffer _buffer
           
private  int _nestedLevel
           
private  java.lang.String _str
           
private static java.lang.String EMPTY_STR
           
private  boolean m_escaping
           
 
Fields inherited from class org.apache.xml.serializer.EmptySerializer
ERR
 
Fields inherited from interface org.apache.xml.serializer.ExtendedContentHandler
HTML_ATTREMPTY, HTML_ATTRURL, NO_BAD_CHARS
 
Constructor Summary
StringValueHandler()
           
 
Method Summary
 void characters(char[] ch, int off, int len)
           
 void characters(java.lang.String characters)
          This method is used to notify of a character event, but passing the data as a character String rather than the standard character array.
 void endElement(java.lang.String qname)
          This method is used to notify that an element has ended.
 java.lang.String getValue()
           
 java.lang.String getValueOfPI()
          The value of a PI must not contain the substring "?>".
 boolean setEscaping(boolean bool)
          Turns special character escaping on/off.
 void startElement(java.lang.String qname)
          This method is used to notify of the start of an element
 
Methods inherited from class org.apache.xml.serializer.EmptySerializer
addAttribute, addAttribute, addAttribute, addAttributes, addUniqueAttribute, addXSLAttribute, asContentHandler, asDOM3Serializer, asDOMSerializer, attributeDecl, characters, close, comment, comment, couldThrowException, couldThrowIOException, couldThrowSAXException, couldThrowSAXException, couldThrowSAXException, elementDecl, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, entityReference, error, externalEntityDecl, fatalError, flushPending, getDoctypePublic, getDoctypeSystem, getEncoding, getIndent, getIndentAmount, getMediaType, getNamespaceMappings, getNamespaceURI, getNamespaceURIFromPrefix, getOmitXMLDeclaration, getOutputFormat, getOutputProperty, getOutputPropertyDefault, getOutputStream, getPrefix, getStandalone, getTransformer, getVersion, getWriter, ignorableWhitespace, internalEntityDecl, namespaceAfterStartElement, notationDecl, processingInstruction, reset, serialize, setCdataSectionElements, setCdataSectionElements, setContentHandler, setDoctype, setDoctypePublic, setDoctypeSystem, setDocumentLocator, setDTDEntityExpansion, setEncoding, setIndent, setIndentAmount, setMediaType, setNamespaceMappings, setOmitXMLDeclaration, setOutputFormat, setOutputProperty, setOutputPropertyDefault, setOutputStream, setSourceLocator, setStandalone, setTransformer, setVersion, setWriter, skippedEntity, startCDATA, startDocument, startDTD, startElement, startElement, startEntity, startPrefixMapping, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_buffer

private java.lang.StringBuffer _buffer

_str

private java.lang.String _str

EMPTY_STR

private static final java.lang.String EMPTY_STR
See Also:
Constant Field Values

m_escaping

private boolean m_escaping

_nestedLevel

private int _nestedLevel
Constructor Detail

StringValueHandler

public StringValueHandler()
Method Detail

characters

public void characters(char[] ch,
                       int off,
                       int len)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class EmptySerializer
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.characters(char[], int, int)

getValue

public java.lang.String getValue()

characters

public void characters(java.lang.String characters)
                throws org.xml.sax.SAXException
Description copied from interface: ExtendedContentHandler
This method is used to notify of a character event, but passing the data as a character String rather than the standard character array.

Specified by:
characters in interface ExtendedContentHandler
Overrides:
characters in class EmptySerializer
Parameters:
characters - the character data
Throws:
org.xml.sax.SAXException
See Also:
ExtendedContentHandler.characters(java.lang.String)

startElement

public void startElement(java.lang.String qname)
                  throws org.xml.sax.SAXException
Description copied from interface: ExtendedContentHandler
This method is used to notify of the start of an element

Specified by:
startElement in interface ExtendedContentHandler
Overrides:
startElement in class EmptySerializer
Parameters:
qname - the fully qualified name of the element
Throws:
org.xml.sax.SAXException
See Also:
ExtendedContentHandler.startElement(java.lang.String)

endElement

public void endElement(java.lang.String qname)
                throws org.xml.sax.SAXException
Description copied from interface: ExtendedContentHandler
This method is used to notify that an element has ended. Unlike the standard SAX method
 endElement(namespaceURI,localName,qName)
 
only the last parameter is passed. If needed the serializer can derive the localName from the qualified name and derive the namespaceURI from its implementation.

Specified by:
endElement in interface ExtendedContentHandler
Overrides:
endElement in class EmptySerializer
Parameters:
qname - the fully qualified element name.
Throws:
org.xml.sax.SAXException
See Also:
ExtendedContentHandler.endElement(java.lang.String)

setEscaping

public boolean setEscaping(boolean bool)
Description copied from interface: SerializationHandler
Turns special character escaping on/off. Note that characters will never, even if this option is set to 'true', be escaped within CDATA sections in output XML documents.

Specified by:
setEscaping in interface SerializationHandler
Overrides:
setEscaping in class EmptySerializer
Parameters:
bool - true if escaping is to be set on.
See Also:
SerializationHandler.setEscaping(boolean)

getValueOfPI

public java.lang.String getValueOfPI()
The value of a PI must not contain the substring "?>". Should that substring be present, replace it by "? >".