You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by ru...@us.ibm.com on 2000/07/23 23:34:35 UTC

[PATCH] another DOM 2 patch


Another patch to support the evolving DOM2 specification.  I took care to
implement this in a way that should continue to work with prior versions of
Xerces.

Index: Nodeset.java
===================================================================
RCS file:
/home/cvspublic/xml-xalan/src/org/apache/xalan/xslt/extensions/Nodeset.java,v

retrieving revision 1.1
diff -u -r1.1 Nodeset.java
--- Nodeset.java        2000/07/19 14:30:37     1.1
+++ Nodeset.java        2000/07/23 21:33:35
@@ -81,6 +81,12 @@
     public Node cloneNode(boolean deep) {
       return this.actualFrag.cloneNode(deep);
     }
+    public boolean hasAttributes() {
+      // long term correct fix:
+      //   return this.actualFrag.hasAttributes();
+      // version that works with Xerces 1.1.2 and prior:
+      return (this.actualFrag.getAttributes().getLength() != 0);
+    }
     public NamedNodeMap getAttributes() {
       return this.actualFrag.getAttributes();
     }

- Sam Ruby

P.S.  The archives seem to be down.  I am now subscribed to this mailing
list for the moment, but if somebody sent a response to my previous patch,
please forward it on to me as I didn't see it.