Java Code Examples for com.sun.org.apache.xml.internal.utils.XMLString#dispatchCharactersEvents()

The following examples show how to use com.sun.org.apache.xml.internal.utils.XMLString#dispatchCharactersEvents() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DOM2DTM.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value of the given node (see http://www.w3.org/TR/xpath#data-model
 * for the definition of a node's string-value). Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param nodeHandle The node ID.
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(
        int nodeHandle, org.xml.sax.ContentHandler ch,
        boolean normalize)
          throws org.xml.sax.SAXException
{
  if(normalize)
  {
    XMLString str = getStringValue(nodeHandle);
    str = str.fixWhiteSpace(true, true, false);
    str.dispatchCharactersEvents(ch);
  }
  else
  {
    int type = getNodeType(nodeHandle);
    Node node = getNode(nodeHandle);
    dispatchNodeData(node, ch, 0);
        // Text coalition -- a DTM text node may represent multiple
        // DOM nodes.
        if(TEXT_NODE == type || CDATA_SECTION_NODE == type)
        {
                while( null != (node=logicalNextDOMTextNode(node)) )
                {
                    dispatchNodeData(node, ch, 0);
                }
        }
  }
}
 
Example 2
Source File: DOM2DTM.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value of the given node (see http://www.w3.org/TR/xpath#data-model
 * for the definition of a node's string-value). Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param nodeHandle The node ID.
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(
        int nodeHandle, org.xml.sax.ContentHandler ch,
        boolean normalize)
          throws org.xml.sax.SAXException
{
  if(normalize)
  {
    XMLString str = getStringValue(nodeHandle);
    str = str.fixWhiteSpace(true, true, false);
    str.dispatchCharactersEvents(ch);
  }
  else
  {
    int type = getNodeType(nodeHandle);
    Node node = getNode(nodeHandle);
    dispatchNodeData(node, ch, 0);
        // Text coalition -- a DTM text node may represent multiple
        // DOM nodes.
        if(TEXT_NODE == type || CDATA_SECTION_NODE == type)
        {
                while( null != (node=logicalNextDOMTextNode(node)) )
                {
                    dispatchNodeData(node, ch, 0);
                }
        }
  }
}
 
Example 3
Source File: DOM2DTM.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value of the given node (see http://www.w3.org/TR/xpath#data-model
 * for the definition of a node's string-value). Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param nodeHandle The node ID.
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(
        int nodeHandle, org.xml.sax.ContentHandler ch,
        boolean normalize)
          throws org.xml.sax.SAXException
{
  if(normalize)
  {
    XMLString str = getStringValue(nodeHandle);
    str = str.fixWhiteSpace(true, true, false);
    str.dispatchCharactersEvents(ch);
  }
  else
  {
    int type = getNodeType(nodeHandle);
    Node node = getNode(nodeHandle);
    dispatchNodeData(node, ch, 0);
        // Text coalition -- a DTM text node may represent multiple
        // DOM nodes.
        if(TEXT_NODE == type || CDATA_SECTION_NODE == type)
        {
                while( null != (node=logicalNextDOMTextNode(node)) )
                {
                    dispatchNodeData(node, ch, 0);
                }
        }
  }
}
 
Example 4
Source File: DOM2DTM.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value of the given node (see http://www.w3.org/TR/xpath#data-model
 * for the definition of a node's string-value). Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param nodeHandle The node ID.
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(
        int nodeHandle, org.xml.sax.ContentHandler ch,
        boolean normalize)
          throws org.xml.sax.SAXException
{
  if(normalize)
  {
    XMLString str = getStringValue(nodeHandle);
    str = str.fixWhiteSpace(true, true, false);
    str.dispatchCharactersEvents(ch);
  }
  else
  {
    int type = getNodeType(nodeHandle);
    Node node = getNode(nodeHandle);
    dispatchNodeData(node, ch, 0);
        // Text coalition -- a DTM text node may represent multiple
        // DOM nodes.
        if(TEXT_NODE == type || CDATA_SECTION_NODE == type)
        {
                while( null != (node=logicalNextDOMTextNode(node)) )
                {
                    dispatchNodeData(node, ch, 0);
                }
        }
  }
}
 
Example 5
Source File: DOM2DTM.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value of the given node (see http://www.w3.org/TR/xpath#data-model
 * for the definition of a node's string-value). Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param nodeHandle The node ID.
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(
        int nodeHandle, org.xml.sax.ContentHandler ch,
        boolean normalize)
          throws org.xml.sax.SAXException
{
  if(normalize)
  {
    XMLString str = getStringValue(nodeHandle);
    str = str.fixWhiteSpace(true, true, false);
    str.dispatchCharactersEvents(ch);
  }
  else
  {
    int type = getNodeType(nodeHandle);
    Node node = getNode(nodeHandle);
    dispatchNodeData(node, ch, 0);
        // Text coalition -- a DTM text node may represent multiple
        // DOM nodes.
        if(TEXT_NODE == type || CDATA_SECTION_NODE == type)
        {
                while( null != (node=logicalNextDOMTextNode(node)) )
                {
                    dispatchNodeData(node, ch, 0);
                }
        }
  }
}
 
Example 6
Source File: DOM2DTM.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value of the given node (see http://www.w3.org/TR/xpath#data-model
 * for the definition of a node's string-value). Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param nodeHandle The node ID.
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(
        int nodeHandle, org.xml.sax.ContentHandler ch,
        boolean normalize)
          throws org.xml.sax.SAXException
{
  if(normalize)
  {
    XMLString str = getStringValue(nodeHandle);
    str = str.fixWhiteSpace(true, true, false);
    str.dispatchCharactersEvents(ch);
  }
  else
  {
    int type = getNodeType(nodeHandle);
    Node node = getNode(nodeHandle);
    dispatchNodeData(node, ch, 0);
        // Text coalition -- a DTM text node may represent multiple
        // DOM nodes.
        if(TEXT_NODE == type || CDATA_SECTION_NODE == type)
        {
                while( null != (node=logicalNextDOMTextNode(node)) )
                {
                    dispatchNodeData(node, ch, 0);
                }
        }
  }
}
 
Example 7
Source File: DOM2DTM.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value of the given node (see http://www.w3.org/TR/xpath#data-model
 * for the definition of a node's string-value). Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param nodeHandle The node ID.
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(
        int nodeHandle, org.xml.sax.ContentHandler ch,
        boolean normalize)
          throws org.xml.sax.SAXException
{
  if(normalize)
  {
    XMLString str = getStringValue(nodeHandle);
    str = str.fixWhiteSpace(true, true, false);
    str.dispatchCharactersEvents(ch);
  }
  else
  {
    int type = getNodeType(nodeHandle);
    Node node = getNode(nodeHandle);
    dispatchNodeData(node, ch, 0);
        // Text coalition -- a DTM text node may represent multiple
        // DOM nodes.
        if(TEXT_NODE == type || CDATA_SECTION_NODE == type)
        {
                while( null != (node=logicalNextDOMTextNode(node)) )
                {
                    dispatchNodeData(node, ch, 0);
                }
        }
  }
}
 
Example 8
Source File: DOM2DTM.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value of the given node (see http://www.w3.org/TR/xpath#data-model
 * for the definition of a node's string-value). Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param nodeHandle The node ID.
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(
        int nodeHandle, org.xml.sax.ContentHandler ch,
        boolean normalize)
          throws org.xml.sax.SAXException
{
  if(normalize)
  {
    XMLString str = getStringValue(nodeHandle);
    str = str.fixWhiteSpace(true, true, false);
    str.dispatchCharactersEvents(ch);
  }
  else
  {
    int type = getNodeType(nodeHandle);
    Node node = getNode(nodeHandle);
    dispatchNodeData(node, ch, 0);
        // Text coalition -- a DTM text node may represent multiple
        // DOM nodes.
        if(TEXT_NODE == type || CDATA_SECTION_NODE == type)
        {
                while( null != (node=logicalNextDOMTextNode(node)) )
                {
                    dispatchNodeData(node, ch, 0);
                }
        }
  }
}
 
Example 9
Source File: DOM2DTM.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value of the given node (see http://www.w3.org/TR/xpath#data-model
 * for the definition of a node's string-value). Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param nodeHandle The node ID.
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(
        int nodeHandle, org.xml.sax.ContentHandler ch,
        boolean normalize)
          throws org.xml.sax.SAXException
{
  if(normalize)
  {
    XMLString str = getStringValue(nodeHandle);
    str = str.fixWhiteSpace(true, true, false);
    str.dispatchCharactersEvents(ch);
  }
  else
  {
    int type = getNodeType(nodeHandle);
    Node node = getNode(nodeHandle);
    dispatchNodeData(node, ch, 0);
        // Text coalition -- a DTM text node may represent multiple
        // DOM nodes.
        if(TEXT_NODE == type || CDATA_SECTION_NODE == type)
        {
                while( null != (node=logicalNextDOMTextNode(node)) )
                {
                    dispatchNodeData(node, ch, 0);
                }
        }
  }
}
 
Example 10
Source File: DOM2DTM.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value of the given node (see http://www.w3.org/TR/xpath#data-model
 * for the definition of a node's string-value). Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param nodeHandle The node ID.
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(
        int nodeHandle, org.xml.sax.ContentHandler ch,
        boolean normalize)
          throws org.xml.sax.SAXException
{
  if(normalize)
  {
    XMLString str = getStringValue(nodeHandle);
    str = str.fixWhiteSpace(true, true, false);
    str.dispatchCharactersEvents(ch);
  }
  else
  {
    int type = getNodeType(nodeHandle);
    Node node = getNode(nodeHandle);
    dispatchNodeData(node, ch, 0);
        // Text coalition -- a DTM text node may represent multiple
        // DOM nodes.
        if(TEXT_NODE == type || CDATA_SECTION_NODE == type)
        {
                while( null != (node=logicalNextDOMTextNode(node)) )
                {
                    dispatchNodeData(node, ch, 0);
                }
        }
  }
}
 
Example 11
Source File: DOM2DTM.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value of the given node (see http://www.w3.org/TR/xpath#data-model
 * for the definition of a node's string-value). Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param nodeHandle The node ID.
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(
        int nodeHandle, org.xml.sax.ContentHandler ch,
        boolean normalize)
          throws org.xml.sax.SAXException
{
  if(normalize)
  {
    XMLString str = getStringValue(nodeHandle);
    str = str.fixWhiteSpace(true, true, false);
    str.dispatchCharactersEvents(ch);
  }
  else
  {
    int type = getNodeType(nodeHandle);
    Node node = getNode(nodeHandle);
    dispatchNodeData(node, ch, 0);
        // Text coalition -- a DTM text node may represent multiple
        // DOM nodes.
        if(TEXT_NODE == type || CDATA_SECTION_NODE == type)
        {
                while( null != (node=logicalNextDOMTextNode(node)) )
                {
                    dispatchNodeData(node, ch, 0);
                }
        }
  }
}