com.sun.org.apache.xml.internal.utils.IntVector Java Examples

The following examples show how to use com.sun.org.apache.xml.internal.utils.IntVector. 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: SAX2RTFDTM.java    From hottub 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 #2
Source File: DTMStringPool.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a DTMStringPool using the given chain size
 *
 * @param chainSize The size of the hash chain vector
 */
public DTMStringPool(int chainSize)
  {
    m_intToString=new Vector();
    m_hashChain=new IntVector(chainSize);
    removeAllElements();

    // -sb Add this to force empty strings to be index 0.
    stringToIndex("");
  }
 
Example #3
Source File: DTMAxisIterNodeList.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Public constructor: Wrap a DTMNodeList around an existing
 * and preconfigured DTMAxisIterator
 */
public DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator) {
    if (dtmAxisIterator == null) {
        m_last = 0;
    } else {
        m_cachedNodes = new IntVector();
        m_dtm = dtm;
    }
    m_iter = dtmAxisIterator;
}
 
Example #4
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();
}
 
Example #5
Source File: DTMStringPool.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Create a DTMStringPool using the given chain size
 *
 * @param chainSize The size of the hash chain vector
 */
public DTMStringPool(int chainSize)
  {
    m_intToString = new ArrayList<>();
    m_hashChain= new IntVector(chainSize);
    removeAllElements();

    // -sb Add this to force empty strings to be index 0.
    stringToIndex("");
  }
 
Example #6
Source File: DTMAxisIterNodeList.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Public constructor: Wrap a DTMNodeList around an existing
 * and preconfigured DTMAxisIterator
 */
public DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator) {
    if (dtmAxisIterator == null) {
        m_last = 0;
    } else {
        m_cachedNodes = new IntVector();
        m_dtm = dtm;
    }
    m_iter = dtmAxisIterator;
}
 
Example #7
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 #8
Source File: DTMStringPool.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a DTMStringPool using the given chain size
 *
 * @param chainSize The size of the hash chain vector
 */
public DTMStringPool(int chainSize)
  {
    m_intToString=new Vector();
    m_hashChain=new IntVector(chainSize);
    removeAllElements();

    // -sb Add this to force empty strings to be index 0.
    stringToIndex("");
  }
 
Example #9
Source File: DTMAxisIterNodeList.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Public constructor: Wrap a DTMNodeList around an existing
 * and preconfigured DTMAxisIterator
 */
public DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator) {
    if (dtmAxisIterator == null) {
        m_last = 0;
    } else {
        m_cachedNodes = new IntVector();
        m_dtm = dtm;
    }
    m_iter = dtmAxisIterator;
}
 
Example #10
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 #11
Source File: DTMStringPool.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a DTMStringPool using the given chain size
 *
 * @param chainSize The size of the hash chain vector
 */
public DTMStringPool(int chainSize)
  {
    m_intToString=new Vector();
    m_hashChain=new IntVector(chainSize);
    removeAllElements();

    // -sb Add this to force empty strings to be index 0.
    stringToIndex("");
  }
 
Example #12
Source File: DTMAxisIterNodeList.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Public constructor: Wrap a DTMNodeList around an existing
 * and preconfigured DTMAxisIterator
 */
public DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator) {
    if (dtmAxisIterator == null) {
        m_last = 0;
    } else {
        m_cachedNodes = new IntVector();
        m_dtm = dtm;
    }
    m_iter = dtmAxisIterator;
}
 
Example #13
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 #14
Source File: DTMStringPool.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a DTMStringPool using the given chain size
 *
 * @param chainSize The size of the hash chain vector
 */
public DTMStringPool(int chainSize)
  {
    m_intToString=new Vector();
    m_hashChain=new IntVector(chainSize);
    removeAllElements();

    // -sb Add this to force empty strings to be index 0.
    stringToIndex("");
  }
 
Example #15
Source File: DTMAxisIterNodeList.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Public constructor: Wrap a DTMNodeList around an existing
 * and preconfigured DTMAxisIterator
 */
public DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator) {
    if (dtmAxisIterator == null) {
        m_last = 0;
    } else {
        m_cachedNodes = new IntVector();
        m_dtm = dtm;
    }
    m_iter = dtmAxisIterator;
}
 
Example #16
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 #17
Source File: DTMStringPool.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a DTMStringPool using the given chain size
 *
 * @param chainSize The size of the hash chain vector
 */
public DTMStringPool(int chainSize)
  {
    m_intToString=new Vector();
    m_hashChain=new IntVector(chainSize);
    removeAllElements();

    // -sb Add this to force empty strings to be index 0.
    stringToIndex("");
  }
 
Example #18
Source File: DTMAxisIterNodeList.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Public constructor: Wrap a DTMNodeList around an existing
 * and preconfigured DTMAxisIterator
 */
public DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator) {
    if (dtmAxisIterator == null) {
        m_last = 0;
    } else {
        m_cachedNodes = new IntVector();
        m_dtm = dtm;
    }
    m_iter = dtmAxisIterator;
}
 
Example #19
Source File: DTMAxisIterNodeList.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Public constructor: Wrap a DTMNodeList around an existing
 * and preconfigured DTMAxisIterator
 */
public DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator) {
    if (dtmAxisIterator == null) {
        m_last = 0;
    } else {
        m_cachedNodes = new IntVector();
        m_dtm = dtm;
    }
    m_iter = dtmAxisIterator;
}
 
Example #20
Source File: DTMStringPool.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a DTMStringPool using the given chain size
 *
 * @param chainSize The size of the hash chain vector
 */
public DTMStringPool(int chainSize)
  {
    m_intToString=new Vector();
    m_hashChain=new IntVector(chainSize);
    removeAllElements();

    // -sb Add this to force empty strings to be index 0.
    stringToIndex("");
  }
 
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: DTMAxisIterNodeList.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Public constructor: Wrap a DTMNodeList around an existing
 * and preconfigured DTMAxisIterator
 */
public DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator) {
    if (dtmAxisIterator == null) {
        m_last = 0;
    } else {
        m_cachedNodes = new IntVector();
        m_dtm = dtm;
    }
    m_iter = dtmAxisIterator;
}
 
Example #23
Source File: DTMStringPool.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Create a DTMStringPool using the given chain size
 *
 * @param chainSize The size of the hash chain vector
 */
public DTMStringPool(int chainSize)
  {
    m_intToString=new Vector();
    m_hashChain=new IntVector(chainSize);
    removeAllElements();

    // -sb Add this to force empty strings to be index 0.
    stringToIndex("");
  }
 
Example #24
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 #25
Source File: DTMAxisIterNodeList.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Public constructor: Wrap a DTMNodeList around an existing
 * and preconfigured DTMAxisIterator
 */
public DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator) {
    if (dtmAxisIterator == null) {
        m_last = 0;
    } else {
        m_cachedNodes = new IntVector();
        m_dtm = dtm;
    }
    m_iter = dtmAxisIterator;
}
 
Example #26
Source File: DTMStringPool.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a DTMStringPool using the given chain size
 *
 * @param chainSize The size of the hash chain vector
 */
public DTMStringPool(int chainSize)
  {
    m_intToString=new Vector();
    m_hashChain=new IntVector(chainSize);
    removeAllElements();

    // -sb Add this to force empty strings to be index 0.
    stringToIndex("");
  }
 
Example #27
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 #28
Source File: DTMAxisIterNodeList.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Public constructor: Wrap a DTMNodeList around an existing
 * and preconfigured DTMAxisIterator
 */
public DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator) {
    if (dtmAxisIterator == null) {
        m_last = 0;
    } else {
        m_cachedNodes = new IntVector();
        m_dtm = dtm;
    }
    m_iter = dtmAxisIterator;
}
 
Example #29
Source File: DTMStringPool.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a DTMStringPool using the given chain size
 *
 * @param chainSize The size of the hash chain vector
 */
public DTMStringPool(int chainSize)
  {
    m_intToString=new Vector();
    m_hashChain=new IntVector(chainSize);
    removeAllElements();

    // -sb Add this to force empty strings to be index 0.
    stringToIndex("");
  }
 
Example #30
Source File: SAX2RTFDTM.java    From TencentKona-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();
}