You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Scott Boag/CAM/Lotus <Sc...@lotus.com> on 2000/08/01 01:58:26 UTC

Re: [PATCH] another DOM 2 patch

Patch added.

-scott




                                                                                                                   
                    rubys@us.ibm.                                                                                  
                    com                  To:     xalan-dev@xml.apache.org                                          
                                         cc:     (bcc: Scott Boag/CAM/Lotus)                                       
                    07/23/2000           Subject:     [PATCH] another DOM 2 patch                                  
                    05:34 PM                                                                                       
                    Please                                                                                         
                    respond to                                                                                     
                    xalan-dev                                                                                      
                                                                                                                   
                                                                                                                   





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.