< prev index next >
src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/AttList.java
Print this page
@@ -1,8 +1,7 @@
/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, 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.
@@ -38,43 +37,24 @@
NamedNodeMap m_attrs;
/** Index of last attribute node */
int m_lastIndex;
- // ARGHH!! JAXP Uses Xerces without setting the namespace processing to ON!
+ // JAXP Uses Xerces without setting the namespace processing to ON!
// DOM2Helper m_dh = new DOM2Helper();
- /** Local reference to DOMHelper */
- DOMHelper m_dh;
-
-// /**
-// * Constructor AttList
-// *
-// *
-// * @param attrs List of attributes this will contain
-// */
-// public AttList(NamedNodeMap attrs)
-// {
-//
-// m_attrs = attrs;
-// m_lastIndex = m_attrs.getLength() - 1;
-// m_dh = new DOM2Helper();
-// }
-
/**
* Constructor AttList
*
*
* @param attrs List of attributes this will contain
* @param dh DOMHelper
*/
- public AttList(NamedNodeMap attrs, DOMHelper dh)
+ public AttList(NamedNodeMap attrs)
{
-
m_attrs = attrs;
m_lastIndex = m_attrs.getLength() - 1;
- m_dh = dh;
}
/**
* Get the number of attribute nodes in the list
*
@@ -94,11 +74,11 @@
* is available, or null if the index is out of
* range.
*/
public String getURI(int index)
{
- String ns = m_dh.getNamespaceOfNode(((Attr) m_attrs.item(index)));
+ String ns = DOM2Helper.getNamespaceOfNode(((Attr) m_attrs.item(index)));
if(null == ns)
ns = "";
return ns;
}
@@ -110,11 +90,11 @@
* processing is not being performed, or null
* if the index is out of range.
*/
public String getLocalName(int index)
{
- return m_dh.getLocalNameOfNode(((Attr) m_attrs.item(index)));
+ return DOM2Helper.getLocalNameOfNode(((Attr) m_attrs.item(index)));
}
/**
* Look up an attribute's qualified name by index.
*
< prev index next >