DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27685>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27685

Case-sensitivity with LSParser.domConfig

           Summary: Case-sensitivity with LSParser.domConfig
           Product: Xerces2-J
           Version: 2.6.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: DOM
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


In instances where fConfiguration.getFeature or setFeature is invoked on 
parameter 'name' in the canSet, get or setParameter methods, case-sensitivity 
is an issue.  Failing DOM LS test cases LSParserConfig1, 3, 5, 8 and 9

Also, in canSetParameter method of LSParser's domConfig, checking to see 
whether a specific parameter can be set with the value null should return true. 
[1]

[1]http://www.w3.org/TR/2004/PR-DOM-Level-3-Core-
20040205/core.html#DOMConfiguration

Proposed patch in DOMParserImpl:

--- C:\xml-xerces\java\src/org/apache/xerces/parsers/DOMParserImpl.java 2004-03-
15 16:37:12.00 -0500  1.18
+++ C:\xerces-temp\DOMParserImpl.java   2004-03-15 16:26:19.00 -0500
@@ -391,7 +391,7 @@
                 else {
                     // Constants.DOM_CHARSET_OVERRIDES_XML_ENCODING feature
                     // or any Xerces feature
-                    fConfiguration.setFeature (name, state);
+                    fConfiguration.setFeature (name.toLowerCase(), state);
                 }

             }
@@ -618,7 +618,7 @@
         || name.equalsIgnoreCase (Constants.DOM_CANONICAL_FORM)
         || name.equalsIgnoreCase (Constants.DOM_SUPPORTED_MEDIATYPES_ONLY)
         || name.equalsIgnoreCase (Constants.DOM_CHARSET_OVERRIDES_XML_ENCODING)
) {
-            return (fConfiguration.getFeature (name))
+            return (fConfiguration.getFeature (name.toLowerCase()))
             ? Boolean.TRUE
             : Boolean.FALSE;
         }
@@ -665,6 +665,9 @@
     }

     public boolean canSetParameter (String name, Object value) {
+        if (value == null){
+          return true;
+        }
         if(value instanceof Boolean){
             boolean state = ((Boolean)value).booleanValue ();
             if ( name.equalsIgnoreCase (Constants.DOM_SUPPORTED_MEDIATYPES_ONLY
)
@@ -697,7 +700,7 @@

             // Recognize Xerces features.
             try {
-                fConfiguration.getFeature (name);
+                fConfiguration.getFeature (name.toLowerCase());
                 return true;
             }
             catch (XMLConfigurationException e) {

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to