## org.apache.xalan.xsltc.runtime
Class StringValueHandler

    java.lang.Object
      org.apache.xml.serializer.EmptySerializer
          org.apache.xalan.xsltc.runtime.StringValueHandler

All Implemented Interfaces:
  ContentHandler, DeclHandler, DOMSerializer, ErrorHandler, ExtendedContentHandler, ExtendedLexicalHandler, LexicalHandler, SerializationHandler, Serializer, XSLOutputAttributes

public final class StringValueHandler
extends EmptySerializer

Author:
  Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary

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)` Receive notification of character data.
`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, addAttributes, addUniqueAttribute, asContentHandler, asDOMSerializer, attributeDecl, close, comment, comment, elementDecl, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, entityReference, error, externalEntityDecl, fatalError, flushPending, getDoctypePublic, getDoctypeSystem, getEncoding, getIndent, getIndentAmount, getMediaType, getNamespaceMappings, getNamespaceURI, getNamespaceURIFromPrefix, getOmitXMLDeclaration, getOutputFormat, getOutputStream, getPrefix, getStandalone, getTransformer, getVersion, getWriter, ignorableWhitespace, internalEntityDecl, namespaceAfterStartElement, processingInstruction, reset, serialize, setCdataSectionElements, setCdataSectionElements, setContentHandler, setDoctype, setDoctypePublic, setDoctypeSystem, setDocumentLocator, setEncoding, setIndent, setIndentAmount, setMediaType, setNamespaceMappings, setOmitXMLDeclaration, setOutputFormat, setOutputStream, setSourceLocator, setStandalone, setTransformer, setVersion, setWriter, skippedEntity, startCDATA, startDocument, startDTD, startElement, startElement, startEntity, startPrefixMapping, startPrefixMapping, warning`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StringValueHandler

    public StringValueHandler()

Method Detail

### characters

    public void characters(char[] ch,
                           int off,
                           int len)
                    throws SAXException

  Description copied from interface: `ContentHandler`
  Receive notification of character data.

  The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.

  The application must not attempt to read from the array outside of the specified range.

  Individual characters may consist of more than one Java `char` value. There are two important cases where this happens, because characters can't be represented in just sixteen bits. In one case, characters are represented in a Surrogate Pair, using two special Unicode values. Such characters are in the so-called "Astral Planes", with a code point above U+FFFF. A second case involves composite characters, such as a base character combining with one or more accent characters.

  Your code should not assume that algorithms using `char`-at-a-time idioms will be working in character units; in some cases they will split characters. This is relevant wherever XML permits arbitrary characters, such as attribute values, processing instruction data, and comments as well as in data reported from this method. It's also generally relevant whenever Java code manipulates internationalized text; the issue isn't unique to XML.

  Note that some parsers will report whitespace in element content using the `ignorableWhitespace` method rather than this one (validating parsers must do so).

  Specified by:
    `characters` in interface `ContentHandler`
  Overrides:
    `characters` in class `EmptySerializer`
  Throws:
    `SAXException`
  See Also:
    `ContentHandler.characters(char[], int, int)`

### getValue

    public java.lang.String getValue()

### characters

    public void characters(java.lang.String characters)
                    throws 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`
  Throws:
    `SAXException`
  See Also:
    `ExtendedContentHandler.characters(java.lang.String)`

### startElement

    public void startElement(java.lang.String qname)
                      throws 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`
  Throws:
    `SAXException`
  See Also:
    `ExtendedContentHandler.startElement(java.lang.String)`

### endElement

    public void endElement(java.lang.String qname)
                    throws 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`
  Throws:
    `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`
  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 "? >".

Copyright © 2004 Apache XML Project. All Rights Reserved.