src/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java

Print this page

        

*** 24,34 **** import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import java.util.Properties; ! import java.util.Vector; import javax.xml.transform.SourceLocator; import javax.xml.transform.Transformer; import org.w3c.dom.Node; --- 24,34 ---- import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import java.util.Properties; ! import java.util.ArrayList; import javax.xml.transform.SourceLocator; import javax.xml.transform.Transformer; import org.w3c.dom.Node;
*** 98,113 **** /** * A collection of namespace URI's (only for first element). * _namespacePrefix has the matching prefix for these URI's */ ! private Vector m_namespaceURI = null; /** * A collection of namespace Prefix (only for first element) * _namespaceURI has the matching URIs for these prefix' */ ! private Vector m_namespacePrefix = null; /** * true if startDocument() was called before the underlying handler * was initialized */ --- 98,113 ---- /** * A collection of namespace URI's (only for first element). * _namespacePrefix has the matching prefix for these URI's */ ! private ArrayList<String> m_namespaceURI = null; /** * A collection of namespace Prefix (only for first element) * _namespaceURI has the matching URIs for these prefix' */ ! private ArrayList<String> m_namespacePrefix = null; /** * true if startDocument() was called before the underlying handler * was initialized */
*** 419,433 **** } else { if (m_namespacePrefix == null) { ! m_namespacePrefix = new Vector(); ! m_namespaceURI = new Vector(); } ! m_namespacePrefix.addElement(prefix); ! m_namespaceURI.addElement(uri); if (m_firstElementURI == null) { if (prefix.equals(m_firstElementPrefix)) m_firstElementURI = uri; --- 419,433 ---- } else { if (m_namespacePrefix == null) { ! m_namespacePrefix = new ArrayList<>(); ! m_namespaceURI = new ArrayList<>(); } ! m_namespacePrefix.add(prefix); ! m_namespaceURI.add(uri); if (m_firstElementURI == null) { if (prefix.equals(m_firstElementPrefix)) m_firstElementURI = uri;
*** 1090,1101 **** { final int n = m_namespacePrefix.size(); for (int i = 0; i < n; i++) { final String prefix = ! (String) m_namespacePrefix.elementAt(i); ! final String uri = (String) m_namespaceURI.elementAt(i); m_handler.startPrefixMapping(prefix, uri, false); } m_namespacePrefix = null; m_namespaceURI = null; } --- 1090,1101 ---- { final int n = m_namespacePrefix.size(); for (int i = 0; i < n; i++) { final String prefix = ! (String) m_namespacePrefix.get(i); ! final String uri = (String) m_namespaceURI.get(i); m_handler.startPrefixMapping(prefix, uri, false); } m_namespacePrefix = null; m_namespaceURI = null; }
*** 1163,1174 **** * then the doecument doesn't start with an <html> tag, and isn't html */ final int max = m_namespacePrefix.size(); for (int i = 0; i < max; i++) { ! final String prefix = (String) m_namespacePrefix.elementAt(i); ! final String uri = (String) m_namespaceURI.elementAt(i); if (m_firstElementPrefix != null && m_firstElementPrefix.equals(prefix) && !EMPTYSTRING.equals(uri)) { --- 1163,1174 ---- * then the doecument doesn't start with an <html> tag, and isn't html */ final int max = m_namespacePrefix.size(); for (int i = 0; i < max; i++) { ! final String prefix = m_namespacePrefix.get(i); ! final String uri = m_namespaceURI.get(i); if (m_firstElementPrefix != null && m_firstElementPrefix.equals(prefix) && !EMPTYSTRING.equals(uri)) {
*** 1192,1202 **** /** * @param URI_and_localNames Vector a list of pairs of URI/localName * specified in the cdata-section-elements attribute. * @see SerializationHandler#setCdataSectionElements(java.util.Vector) */ ! public void setCdataSectionElements(Vector URI_and_localNames) { m_handler.setCdataSectionElements(URI_and_localNames); } /** * @see ExtendedContentHandler#addAttributes(org.xml.sax.Attributes) --- 1192,1202 ---- /** * @param URI_and_localNames Vector a list of pairs of URI/localName * specified in the cdata-section-elements attribute. * @see SerializationHandler#setCdataSectionElements(java.util.Vector) */ ! public void setCdataSectionElements(ArrayList<String> URI_and_localNames) { m_handler.setCdataSectionElements(URI_and_localNames); } /** * @see ExtendedContentHandler#addAttributes(org.xml.sax.Attributes)