[ http://issues.apache.org/jira/browse/XERCESJ-916?page=all ]
nddelima resolved XERCESJ-916:
------------------------------
Resolution: Fixed
Assign To: (was: Xerces-J Developers Mailing List)
Fix for checking for null parameters has been applied.
> Case-sensitivity with LSParser.domConfig
> ----------------------------------------
>
> Key: XERCESJ-916
> URL: http://issues.apache.org/jira/browse/XERCESJ-916
> Project: Xerces2-J
> Type: Bug
> Components: DOM
> Versions: 2.6.2
> Environment: Operating System: Other
> Platform: Other
> Reporter: Naela Nissar
>
> 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) {
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]