< prev index next >
jaxp/src/com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
--- 1,7 ----
/*
! * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
*** 15,27 ****
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
- /*
- * $Id: SAXImpl.java,v 1.5 2005/09/28 13:48:37 pvedula Exp $
- */
package com.sun.org.apache.xalan.internal.xsltc.dom;
import com.sun.org.apache.xalan.internal.xsltc.DOM;
import com.sun.org.apache.xalan.internal.xsltc.DOMEnhancedForDTM;
--- 15,24 ----
*** 80,102 ****
/* DOMBuilder fields BEGIN */
/* ------------------------------------------------------------------- */
// Namespace prefix-to-uri mapping stuff
private int _uriCount = 0;
! private int _prefixCount = 0;
// Stack used to keep track of what whitespace text nodes are protected
// by xml:space="preserve" attributes and which nodes that are not.
private int[] _xmlSpaceStack;
private int _idx = 1;
private boolean _preserve = false;
! private static final String XML_STRING = "xml:";
private static final String XML_PREFIX = "xml";
private static final String XMLSPACE_STRING = "xml:space";
private static final String PRESERVE_STRING = "preserve";
! private static final String XMLNS_PREFIX = "xmlns";
private static final String XML_URI = "http://www.w3.org/XML/1998/namespace";
private boolean _escaping = true;
private boolean _disableEscaping = false;
private int _textNodeToProcess = DTM.NULL;
--- 77,99 ----
/* DOMBuilder fields BEGIN */
/* ------------------------------------------------------------------- */
// Namespace prefix-to-uri mapping stuff
private int _uriCount = 0;
! // private int _prefixCount = 0;
// Stack used to keep track of what whitespace text nodes are protected
// by xml:space="preserve" attributes and which nodes that are not.
private int[] _xmlSpaceStack;
private int _idx = 1;
private boolean _preserve = false;
! // private static final String XML_STRING = "xml:";
private static final String XML_PREFIX = "xml";
private static final String XMLSPACE_STRING = "xml:space";
private static final String PRESERVE_STRING = "preserve";
! // private static final String XMLNS_PREFIX = "xmlns";
private static final String XML_URI = "http://www.w3.org/XML/1998/namespace";
private boolean _escaping = true;
private boolean _disableEscaping = false;
private int _textNodeToProcess = DTM.NULL;
*** 121,131 ****
// Tracks which textnodes are not escaped
private BitArray _dontEscape = null;
// The URI to this document
! private String _documentURI = null;
static private int _documentURIIndex = 0;
// The owner Document when the input source is DOMSource.
private Document _document;
--- 118,128 ----
// Tracks which textnodes are not escaped
private BitArray _dontEscape = null;
// The URI to this document
! // private String _documentURI = null;
static private int _documentURIIndex = 0;
// The owner Document when the input source is DOMSource.
private Document _document;
*** 141,152 ****
private XSLTCDTMManager _dtmManager;
// Support for access/navigation through org.w3c.dom API
private Node[] _nodes;
private NodeList[] _nodeLists;
! private final static String XML_LANG_ATTRIBUTE =
! "http://www.w3.org/XML/1998/namespace:@lang";
/**
* Define the origin of the document from which the tree was built
*/
public void setDocumentURI(String uri) {
--- 138,148 ----
private XSLTCDTMManager _dtmManager;
// Support for access/navigation through org.w3c.dom API
private Node[] _nodes;
private NodeList[] _nodeLists;
! // private final static String XML_LANG_ATTRIBUTE = "http://www.w3.org/XML/1998/namespace:@lang";
/**
* Define the origin of the document from which the tree was built
*/
public void setDocumentURI(String uri) {
*** 489,498 ****
--- 485,495 ----
}
/**
* Sets up a translet-to-dom type mapping table
*/
+ /*
private int[] setupMapping(String[] names, String[] uris, int[] types, int nNames) {
// Padding with number of names, because they
// may need to be added, i.e for RTFs. See copy03
final int[] result = new int[m_expandedNameTable.getSize()];
for (int i = 0; i < nNames; i++) {
*** 500,509 ****
--- 497,507 ----
int type = m_expandedNameTable.getExpandedTypeID(uris[i], names[i], types[i], false);
result[type] = type;
}
return result;
}
+ */
/**
* Returns the internal type associated with an expanded QName
*/
public int getGeneralizedType(final String name) {
*** 1228,1240 ****
* The 'axis' specifies the axis for the base iterator from which the
* nodes are taken, while 'ns' specifies the namespace URI type.
*/
public DTMAxisIterator getNamespaceAxisIterator(int axis, int ns)
{
-
- DTMAxisIterator iterator = null;
-
if (ns == NO_TYPE) {
return EMPTYITERATOR;
}
else {
switch (axis) {
--- 1226,1235 ----
*** 1544,1554 ****
/**
* Returns the nth descendant of a node
*/
public DTMAxisIterator getNthDescendant(int type, int n, boolean includeself)
{
- DTMAxisIterator source = (DTMAxisIterator) new TypedDescendantIterator(type);
return new NthDescendantIterator(n);
}
/**
* Copy the string value of a node directly to an output handler
--- 1539,1548 ----
*** 1880,1885 ****
--- 1874,1882 ----
else {
return super.getUnparsedEntityURI(name);
}
}
+ public void release() {
+ _dtmManager.release(this, true);
+ }
}
< prev index next >