You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by le...@locus.apache.org on 2000/07/20 20:12:26 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/dom NodeImpl.java
lehors 00/07/20 11:12:25
Modified: java/src/org/w3c/dom Element.java Node.java
java/src/org/apache/xerces/dom NodeImpl.java
Log:
hasAttributes() got moved from Element to Node
Revision Changes Path
1.6 +0 -8 xml-xerces/java/src/org/w3c/dom/Element.java
Index: Element.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Element.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Element.java 2000/07/19 18:36:22 1.5
+++ Element.java 2000/07/20 18:12:20 1.6
@@ -277,14 +277,6 @@
String localName);
/**
- * Returns whether this element has any attributes.
- * @return <code>true</code> if this element has any attributes,
- * <code>false</code> otherwise.
- * @since DOM Level 2
- */
- public boolean hasAttributes();
-
- /**
* Returns <code>true</code> when an attribute with a given name is
* specified on this element or has a default value, <code>false</code>
* otherwise.
1.4 +7 -0 xml-xerces/java/src/org/w3c/dom/Node.java
Index: Node.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Node.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Node.java 2000/02/22 00:14:58 1.3
+++ Node.java 2000/07/20 18:12:21 1.4
@@ -341,5 +341,12 @@
*/
public String getLocalName();
+ /**
+ * Returns whether this node (if it is an element) has any attributes.
+ * @return <code>true</code> if this node has any attributes,
+ * <code>false</code> otherwise.
+ * @since DOM Level 2
+ */
+ public boolean hasAttributes();
}
1.28 +12 -1 xml-xerces/java/src/org/apache/xerces/dom/NodeImpl.java
Index: NodeImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/NodeImpl.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- NodeImpl.java 2000/07/07 20:33:07 1.27
+++ NodeImpl.java 2000/07/20 18:12:24 1.28
@@ -350,6 +350,17 @@
}
/**
+ * Returns whether this node (if it is an element) has any attributes.
+ * @return <code>true</code> if this node has any attributes,
+ * <code>false</code> otherwise.
+ * @since DOM Level 2
+ * @see ElementImpl
+ */
+ public boolean hasAttributes() {
+ return false; // overridden in ElementImpl
+ }
+
+ /**
* Test whether this node has any children. Convenience shorthand
* for (Node.getFirstChild()!=null)
* <P>
@@ -657,7 +668,7 @@
the DOM Level 2 Events module, perhaps allowing it
to be optimized out to save bytecodes.
*/
- protected final static boolean MUTATIONEVENTS=true;
+ protected final static boolean MUTATIONEVENTS=false;
/** The MUTATION_ values are parameters to the NON-DOM
internalInsertBefore() and internalRemoveChild() operations,