src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java

Print this page

        

@@ -99,33 +99,36 @@
          *
          * @param version The version number of the feature being tested.
          * This is interpreted as "Version of the DOM API supported for the
          * specified Feature", and in Level 1 should be "1.0"
          *
-         * @return true iff this implementation is compatable with the specified
+         * @return true if this implementation is compatible with the specified
          * feature and version.
          */
         public boolean hasFeature(String feature, String version) {
 
             boolean anyVersion = version == null || version.length() == 0;
 
             if (feature.startsWith("+")) {
                 feature = feature.substring(1);
             }
-            return (
-                feature.equalsIgnoreCase("Core")
+            return (feature.equalsIgnoreCase("Core") 
                     && (anyVersion
                         || version.equals("1.0")
                         || version.equals("2.0")
                         || version.equals("3.0")))
                         || (feature.equalsIgnoreCase("XML")
                     && (anyVersion
                         || version.equals("1.0")
                         || version.equals("2.0")
                         || version.equals("3.0")))
                         || (feature.equalsIgnoreCase("LS")
-                    && (anyVersion || version.equals("3.0")));
+                        && (anyVersion 
+                            || version.equals("3.0")))
+                    || (feature.equalsIgnoreCase("ElementTraversal")
+                        && (anyVersion 
+                            || version.equals("1.0")));
         } // hasFeature(String,String):boolean
 
 
         /**
          * Introduced in DOM Level 2. <p>