com.sun.org.apache.xml.internal.dtm.DTMWSFilter Java Examples

The following examples show how to use com.sun.org.apache.xml.internal.dtm.DTMWSFilter. 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: SAX2DTM2.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Construct a SAX2DTM2 object using the default block size.
 */
public SAX2DTM2(DTMManager mgr, Source source, int dtmIdentity,
               DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing)
{

  this(mgr, source, dtmIdentity, whiteSpaceFilter,
        xstringfactory, doIndexing, DEFAULT_BLOCKSIZE, true, true, false);
}
 
Example #2
Source File: AdaptiveResultTreeImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public AdaptiveResultTreeImpl(XSLTCDTMManager dtmManager, int documentID,
                              DTMWSFilter wsfilter, int initSize,
                              boolean buildIdIndex)
{
    super(dtmManager, documentID);

    _wsfilter = wsfilter;
    _initSize = initSize;
    _buildIdIndex = buildIdIndex;
}
 
Example #3
Source File: SAXImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the given block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, int blocksize,
               boolean buildIdIndex,
               boolean newNameTable)
{
    super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, blocksize, false, buildIdIndex, newNameTable);

    _dtmManager = mgr;
    _size = blocksize;

    // Use a smaller size for the space stack if the blocksize is small
    _xmlSpaceStack = new int[blocksize <= 64 ? 4 : 64];

    /* From DOMBuilder */
    _xmlSpaceStack[0] = DTMDefaultBase.ROOTNODE;

    // If the input source is DOMSource, set the _document field and
    // create the node2Ids table.
    if (source instanceof DOMSource) {
        _hasDOMSource = true;
        DOMSource domsrc = (DOMSource)source;
        Node node = domsrc.getNode();
        if (node instanceof Document) {
            _document = (Document)node;
        }
        else {
            _document = node.getOwnerDocument();
        }
        _node2Ids = new HashMap<>();
    }
}
 
Example #4
Source File: AdaptiveResultTreeImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public AdaptiveResultTreeImpl(XSLTCDTMManager dtmManager, int documentID,
                              DTMWSFilter wsfilter, int initSize,
                              boolean buildIdIndex)
{
    super(dtmManager, documentID);

    _wsfilter = wsfilter;
    _initSize = initSize;
    _buildIdIndex = buildIdIndex;
}
 
Example #5
Source File: SAXImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the default block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, boolean buildIdIndex)
{
    this(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, DEFAULT_BLOCKSIZE, buildIdIndex, false);
}
 
Example #6
Source File: SAX2RTFDTM.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public SAX2RTFDTM(DTMManager mgr, Source source, int dtmIdentity,
               DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing)
{
  super(mgr, source, dtmIdentity, whiteSpaceFilter,
        xstringfactory, doIndexing);

  // NEVER track source locators for RTFs; they aren't meaningful. I think.
  // (If we did track them, we'd need to tail-prune these too.)
  //com.sun.org.apache.xalan.internal.processor.TransformerFactoryImpl.m_source_location;
  m_useSourceLocationProperty=false;
  m_sourceSystemId = (m_useSourceLocationProperty) ? new StringVector()
                                                   : null;
  m_sourceLine = (m_useSourceLocationProperty) ? new IntVector() : null;
  m_sourceColumn = (m_useSourceLocationProperty) ? new IntVector() : null;

  // Record initial sizes of fields that are pushed and restored
  // for RTF tail-pruning.  More entries can be popped than pushed, so
  // we need this to mark the primordial state of the DTM.
  m_emptyNodeCount = m_size;
  m_emptyNSDeclSetCount = (m_namespaceDeclSets == null)
                               ? 0 : m_namespaceDeclSets.size();
  m_emptyNSDeclSetElemsCount = (m_namespaceDeclSetElements == null)
                                    ? 0 : m_namespaceDeclSetElements.size();
  m_emptyDataCount = m_data.size();
  m_emptyCharsCount = m_chars.size();
  m_emptyDataQNCount = m_dataOrQName.size();
}
 
Example #7
Source File: SAXImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the default block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, boolean buildIdIndex)
{
    this(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, DEFAULT_BLOCKSIZE, buildIdIndex, false);
}
 
Example #8
Source File: SAXImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the default block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, boolean buildIdIndex)
{
    this(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, DEFAULT_BLOCKSIZE, buildIdIndex, false);
}
 
Example #9
Source File: SAXImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the default block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, boolean buildIdIndex)
{
    this(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, DEFAULT_BLOCKSIZE, buildIdIndex, false);
}
 
Example #10
Source File: SAX2RTFDTM.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public SAX2RTFDTM(DTMManager mgr, Source source, int dtmIdentity,
               DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing)
{
  super(mgr, source, dtmIdentity, whiteSpaceFilter,
        xstringfactory, doIndexing);

  // NEVER track source locators for RTFs; they aren't meaningful. I think.
  // (If we did track them, we'd need to tail-prune these too.)
  //com.sun.org.apache.xalan.internal.processor.TransformerFactoryImpl.m_source_location;
  m_useSourceLocationProperty=false;
  m_sourceSystemId = (m_useSourceLocationProperty) ? new StringVector()
                                                   : null;
  m_sourceLine = (m_useSourceLocationProperty) ? new IntVector() : null;
  m_sourceColumn = (m_useSourceLocationProperty) ? new IntVector() : null;

  // Record initial sizes of fields that are pushed and restored
  // for RTF tail-pruning.  More entries can be popped than pushed, so
  // we need this to mark the primordial state of the DTM.
  m_emptyNodeCount = m_size;
  m_emptyNSDeclSetCount = (m_namespaceDeclSets == null)
                               ? 0 : m_namespaceDeclSets.size();
  m_emptyNSDeclSetElemsCount = (m_namespaceDeclSetElements == null)
                                    ? 0 : m_namespaceDeclSetElements.size();
  m_emptyDataCount = m_data.size();
  m_emptyCharsCount = m_chars.size();
  m_emptyDataQNCount = m_dataOrQName.size();
}
 
Example #11
Source File: SAXImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the given block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, int blocksize,
               boolean buildIdIndex,
               boolean newNameTable)
{
    super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, blocksize, false, buildIdIndex, newNameTable);

    _dtmManager = mgr;
    _size = blocksize;

    // Use a smaller size for the space stack if the blocksize is small
    _xmlSpaceStack = new int[blocksize <= 64 ? 4 : 64];

    /* From DOMBuilder */
    _xmlSpaceStack[0] = DTMDefaultBase.ROOTNODE;

    // If the input source is DOMSource, set the _document field and
    // create the node2Ids table.
    if (source instanceof DOMSource) {
        _hasDOMSource = true;
        DOMSource domsrc = (DOMSource)source;
        Node node = domsrc.getNode();
        if (node instanceof Document) {
            _document = (Document)node;
        }
        else {
            _document = node.getOwnerDocument();
        }
        _node2Ids = new HashMap<>();
    }
}
 
Example #12
Source File: SAXImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the default block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, boolean buildIdIndex)
{
    this(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, DEFAULT_BLOCKSIZE, buildIdIndex, false);
}
 
Example #13
Source File: SAXImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the default block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, boolean buildIdIndex)
{
    this(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, DEFAULT_BLOCKSIZE, buildIdIndex, false);
}
 
Example #14
Source File: SAXImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the given block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, int blocksize,
               boolean buildIdIndex,
               boolean newNameTable)
{
    super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, blocksize, false, buildIdIndex, newNameTable);

    _dtmManager = mgr;
    _size = blocksize;

    // Use a smaller size for the space stack if the blocksize is small
    _xmlSpaceStack = new int[blocksize <= 64 ? 4 : 64];

    /* From DOMBuilder */
    _xmlSpaceStack[0] = DTMDefaultBase.ROOTNODE;

    // If the input source is DOMSource, set the _document field and
    // create the node2Ids table.
    if (source instanceof DOMSource) {
        _hasDOMSource = true;
        DOMSource domsrc = (DOMSource)source;
        Node node = domsrc.getNode();
        if (node instanceof Document) {
            _document = (Document)node;
        }
        else {
            _document = node.getOwnerDocument();
        }
        _node2Ids = new HashMap<>();
    }
}
 
Example #15
Source File: SAX2RTFDTM.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public SAX2RTFDTM(DTMManager mgr, Source source, int dtmIdentity,
               DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing)
{
  super(mgr, source, dtmIdentity, whiteSpaceFilter,
        xstringfactory, doIndexing);

  // NEVER track source locators for RTFs; they aren't meaningful. I think.
  // (If we did track them, we'd need to tail-prune these too.)
  //com.sun.org.apache.xalan.internal.processor.TransformerFactoryImpl.m_source_location;
  m_useSourceLocationProperty=false;
  m_sourceSystemId = (m_useSourceLocationProperty) ? new StringVector()
                                                   : null;
  m_sourceLine = (m_useSourceLocationProperty) ? new IntVector() : null;
  m_sourceColumn = (m_useSourceLocationProperty) ? new IntVector() : null;

  // Record initial sizes of fields that are pushed and restored
  // for RTF tail-pruning.  More entries can be popped than pushed, so
  // we need this to mark the primordial state of the DTM.
  m_emptyNodeCount = m_size;
  m_emptyNSDeclSetCount = (m_namespaceDeclSets == null)
                               ? 0 : m_namespaceDeclSets.size();
  m_emptyNSDeclSetElemsCount = (m_namespaceDeclSetElements == null)
                                    ? 0 : m_namespaceDeclSetElements.size();
  m_emptyDataCount = m_data.size();
  m_emptyCharsCount = m_chars.size();
  m_emptyDataQNCount = m_dataOrQName.size();
}
 
Example #16
Source File: SAXImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the default block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, boolean buildIdIndex)
{
    this(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, DEFAULT_BLOCKSIZE, buildIdIndex, false);
}
 
Example #17
Source File: AdaptiveResultTreeImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public AdaptiveResultTreeImpl(XSLTCDTMManager dtmManager, int documentID,
                              DTMWSFilter wsfilter, int initSize,
                              boolean buildIdIndex)
{
    super(dtmManager, documentID);

    _wsfilter = wsfilter;
    _initSize = initSize;
    _buildIdIndex = buildIdIndex;
}
 
Example #18
Source File: SAXImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the default block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, boolean buildIdIndex)
{
    this(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, DEFAULT_BLOCKSIZE, buildIdIndex, false);
}
 
Example #19
Source File: SAXImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the given block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, int blocksize,
               boolean buildIdIndex,
               boolean newNameTable)
{
    super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, blocksize, false, buildIdIndex, newNameTable);

    _dtmManager = mgr;
    _size = blocksize;

    // Use a smaller size for the space stack if the blocksize is small
    _xmlSpaceStack = new int[blocksize <= 64 ? 4 : 64];

    /* From DOMBuilder */
    _xmlSpaceStack[0] = DTMDefaultBase.ROOTNODE;

    // If the input source is DOMSource, set the _document field and
    // create the node2Ids table.
    if (source instanceof DOMSource) {
        _hasDOMSource = true;
        DOMSource domsrc = (DOMSource)source;
        Node node = domsrc.getNode();
        if (node instanceof Document) {
            _document = (Document)node;
        }
        else {
            _document = node.getOwnerDocument();
        }
        _node2Ids = new HashMap<>();
    }
}
 
Example #20
Source File: SAXImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the default block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, boolean buildIdIndex)
{
    this(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, DEFAULT_BLOCKSIZE, buildIdIndex, false);
}
 
Example #21
Source File: SAX2RTFDTM.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public SAX2RTFDTM(DTMManager mgr, Source source, int dtmIdentity,
               DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing)
{
  super(mgr, source, dtmIdentity, whiteSpaceFilter,
        xstringfactory, doIndexing);

  // NEVER track source locators for RTFs; they aren't meaningful. I think.
  // (If we did track them, we'd need to tail-prune these too.)
  //com.sun.org.apache.xalan.internal.processor.TransformerFactoryImpl.m_source_location;
  m_useSourceLocationProperty=false;
  m_sourceSystemId = (m_useSourceLocationProperty) ? new StringVector()
                                                   : null;
  m_sourceLine = (m_useSourceLocationProperty) ? new IntVector() : null;
  m_sourceColumn = (m_useSourceLocationProperty) ? new IntVector() : null;

  // Record initial sizes of fields that are pushed and restored
  // for RTF tail-pruning.  More entries can be popped than pushed, so
  // we need this to mark the primordial state of the DTM.
  m_emptyNodeCount = m_size;
  m_emptyNSDeclSetCount = (m_namespaceDeclSets == null)
                               ? 0 : m_namespaceDeclSets.size();
  m_emptyNSDeclSetElemsCount = (m_namespaceDeclSetElements == null)
                                    ? 0 : m_namespaceDeclSetElements.size();
  m_emptyDataCount = m_data.size();
  m_emptyCharsCount = m_chars.size();
  m_emptyDataQNCount = m_dataOrQName.size();
}
 
Example #22
Source File: SAX2RTFDTM.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public SAX2RTFDTM(DTMManager mgr, Source source, int dtmIdentity,
               DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing)
{
  super(mgr, source, dtmIdentity, whiteSpaceFilter,
        xstringfactory, doIndexing);

  // NEVER track source locators for RTFs; they aren't meaningful. I think.
  // (If we did track them, we'd need to tail-prune these too.)
  //com.sun.org.apache.xalan.internal.processor.TransformerFactoryImpl.m_source_location;
  m_useSourceLocationProperty=false;
  m_sourceSystemId = (m_useSourceLocationProperty) ? new StringVector()
                                                   : null;
  m_sourceLine = (m_useSourceLocationProperty) ? new IntVector() : null;
  m_sourceColumn = (m_useSourceLocationProperty) ? new IntVector() : null;

  // Record initial sizes of fields that are pushed and restored
  // for RTF tail-pruning.  More entries can be popped than pushed, so
  // we need this to mark the primordial state of the DTM.
  m_emptyNodeCount = m_size;
  m_emptyNSDeclSetCount = (m_namespaceDeclSets == null)
                               ? 0 : m_namespaceDeclSets.size();
  m_emptyNSDeclSetElemsCount = (m_namespaceDeclSetElements == null)
                                    ? 0 : m_namespaceDeclSetElements.size();
  m_emptyDataCount = m_data.size();
  m_emptyCharsCount = m_chars.size();
  m_emptyDataQNCount = m_dataOrQName.size();
}
 
Example #23
Source File: SAXImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the given block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, int blocksize,
               boolean buildIdIndex,
               boolean newNameTable)
{
    super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, blocksize, false, buildIdIndex, newNameTable);

    _dtmManager = mgr;
    _size = blocksize;

    // Use a smaller size for the space stack if the blocksize is small
    _xmlSpaceStack = new int[blocksize <= 64 ? 4 : 64];

    /* From DOMBuilder */
    _xmlSpaceStack[0] = DTMDefaultBase.ROOTNODE;

    // If the input source is DOMSource, set the _document field and
    // create the node2Ids table.
    if (source instanceof DOMSource) {
        _hasDOMSource = true;
        DOMSource domsrc = (DOMSource)source;
        Node node = domsrc.getNode();
        if (node instanceof Document) {
            _document = (Document)node;
        }
        else {
            _document = node.getOwnerDocument();
        }
        _node2Ids = new HashMap<>();
    }
}
 
Example #24
Source File: SAX2RTFDTM.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public SAX2RTFDTM(DTMManager mgr, Source source, int dtmIdentity,
               DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing)
{
  super(mgr, source, dtmIdentity, whiteSpaceFilter,
        xstringfactory, doIndexing);

  // NEVER track source locators for RTFs; they aren't meaningful. I think.
  // (If we did track them, we'd need to tail-prune these too.)
  //com.sun.org.apache.xalan.internal.processor.TransformerFactoryImpl.m_source_location;
  m_useSourceLocationProperty=false;
  m_sourceSystemId = (m_useSourceLocationProperty) ? new StringVector()
                                                   : null;
  m_sourceLine = (m_useSourceLocationProperty) ? new IntVector() : null;
  m_sourceColumn = (m_useSourceLocationProperty) ? new IntVector() : null;

  // Record initial sizes of fields that are pushed and restored
  // for RTF tail-pruning.  More entries can be popped than pushed, so
  // we need this to mark the primordial state of the DTM.
  m_emptyNodeCount = m_size;
  m_emptyNSDeclSetCount = (m_namespaceDeclSets == null)
                               ? 0 : m_namespaceDeclSets.size();
  m_emptyNSDeclSetElemsCount = (m_namespaceDeclSetElements == null)
                                    ? 0 : m_namespaceDeclSetElements.size();
  m_emptyDataCount = m_data.size();
  m_emptyCharsCount = m_chars.size();
  m_emptyDataQNCount = m_dataOrQName.size();
}
 
Example #25
Source File: SAX2RTFDTM.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public SAX2RTFDTM(DTMManager mgr, Source source, int dtmIdentity,
               DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing)
{
  super(mgr, source, dtmIdentity, whiteSpaceFilter,
        xstringfactory, doIndexing);

  // NEVER track source locators for RTFs; they aren't meaningful. I think.
  // (If we did track them, we'd need to tail-prune these too.)
  //com.sun.org.apache.xalan.internal.processor.TransformerFactoryImpl.m_source_location;
  m_useSourceLocationProperty=false;
  m_sourceSystemId = (m_useSourceLocationProperty) ? new StringVector()
                                                   : null;
  m_sourceLine = (m_useSourceLocationProperty) ? new IntVector() : null;
  m_sourceColumn = (m_useSourceLocationProperty) ? new IntVector() : null;

  // Record initial sizes of fields that are pushed and restored
  // for RTF tail-pruning.  More entries can be popped than pushed, so
  // we need this to mark the primordial state of the DTM.
  m_emptyNodeCount = m_size;
  m_emptyNSDeclSetCount = (m_namespaceDeclSets == null)
                               ? 0 : m_namespaceDeclSets.size();
  m_emptyNSDeclSetElemsCount = (m_namespaceDeclSetElements == null)
                                    ? 0 : m_namespaceDeclSetElements.size();
  m_emptyDataCount = m_data.size();
  m_emptyCharsCount = m_chars.size();
  m_emptyDataQNCount = m_dataOrQName.size();
}
 
Example #26
Source File: AdaptiveResultTreeImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public AdaptiveResultTreeImpl(XSLTCDTMManager dtmManager, int documentID,
                              DTMWSFilter wsfilter, int initSize,
                              boolean buildIdIndex)
{
    super(dtmManager, documentID);

    _wsfilter = wsfilter;
    _initSize = initSize;
    _buildIdIndex = buildIdIndex;
}
 
Example #27
Source File: SAXImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the default block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, boolean buildIdIndex)
{
    this(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, DEFAULT_BLOCKSIZE, buildIdIndex, false);
}
 
Example #28
Source File: SAXImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Construct a SAXImpl object using the given block size.
 */
public SAXImpl(XSLTCDTMManager mgr, Source source,
               int dtmIdentity, DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing, int blocksize,
               boolean buildIdIndex,
               boolean newNameTable)
{
    super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
        doIndexing, blocksize, false, buildIdIndex, newNameTable);

    _dtmManager = mgr;
    _size = blocksize;

    // Use a smaller size for the space stack if the blocksize is small
    _xmlSpaceStack = new int[blocksize <= 64 ? 4 : 64];

    /* From DOMBuilder */
    _xmlSpaceStack[0] = DTMDefaultBase.ROOTNODE;

    // If the input source is DOMSource, set the _document field and
    // create the node2Ids table.
    if (source instanceof DOMSource) {
        _hasDOMSource = true;
        DOMSource domsrc = (DOMSource)source;
        Node node = domsrc.getNode();
        if (node instanceof Document) {
            _document = (Document)node;
        }
        else {
            _document = node.getOwnerDocument();
        }
        _node2Ids = new HashMap<>();
    }
}
 
Example #29
Source File: SAX2DTM2.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Construct a SAX2DTM2 object using the given block size.
 */
public SAX2DTM2(DTMManager mgr, Source source, int dtmIdentity,
               DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing,
               int blocksize,
               boolean usePrevsib,
               boolean buildIdIndex,
               boolean newNameTable)
{

  super(mgr, source, dtmIdentity, whiteSpaceFilter,
        xstringfactory, doIndexing, blocksize, usePrevsib, newNameTable);

  // Initialize the values of m_SHIFT and m_MASK.
  int shift;
  for(shift=0; (blocksize>>>=1) != 0; ++shift);

  m_blocksize = 1<<shift;
  m_SHIFT = shift;
  m_MASK = m_blocksize - 1;

  m_buildIdIndex = buildIdIndex;

  // Some documents do not have attribute nodes. That is why
  // we set the initial size of this ArrayList to be small.
  m_values = new ArrayList<>(32);

  m_maxNodeIndex = 1 << DTMManager.IDENT_DTM_NODE_BITS;

  // Set the map0 values in the constructor.
  m_exptype_map0 = m_exptype.getMap0();
  m_nextsib_map0 = m_nextsib.getMap0();
  m_firstch_map0 = m_firstch.getMap0();
  m_parent_map0  = m_parent.getMap0();
}
 
Example #30
Source File: SAX2RTFDTM.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public SAX2RTFDTM(DTMManager mgr, Source source, int dtmIdentity,
               DTMWSFilter whiteSpaceFilter,
               XMLStringFactory xstringfactory,
               boolean doIndexing)
{
  super(mgr, source, dtmIdentity, whiteSpaceFilter,
        xstringfactory, doIndexing);

  // NEVER track source locators for RTFs; they aren't meaningful. I think.
  // (If we did track them, we'd need to tail-prune these too.)
  //com.sun.org.apache.xalan.internal.processor.TransformerFactoryImpl.m_source_location;
  m_useSourceLocationProperty=false;
  m_sourceSystemId = (m_useSourceLocationProperty) ? new StringVector()
                                                   : null;
  m_sourceLine = (m_useSourceLocationProperty) ? new IntVector() : null;
  m_sourceColumn = (m_useSourceLocationProperty) ? new IntVector() : null;

  // Record initial sizes of fields that are pushed and restored
  // for RTF tail-pruning.  More entries can be popped than pushed, so
  // we need this to mark the primordial state of the DTM.
  m_emptyNodeCount = m_size;
  m_emptyNSDeclSetCount = (m_namespaceDeclSets == null)
                               ? 0 : m_namespaceDeclSets.size();
  m_emptyNSDeclSetElemsCount = (m_namespaceDeclSetElements == null)
                                    ? 0 : m_namespaceDeclSetElements.size();
  m_emptyDataCount = m_data.size();
  m_emptyCharsCount = m_chars.size();
  m_emptyDataQNCount = m_dataOrQName.size();
}