Issue Details (XML | Word | Printable)

Key: XERCESJ-971
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Venugopal Rao K
Reporter: Venugopal Rao K
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Xerces2-J

DOMConfiguration param. from getParameterNames() not recognized by getParameter

Created: 31/May/04 05:27 AM   Updated: 12/Jul/04 07:04 AM
Return to search
Component/s: DOM (Level 3 Core)
Affects Version/s: 2.6.2
Fix Version/s: 2.6.2

Time Tracking:
Not Specified

Resolution Date: 12/Jul/04 07:04 AM


 Description  « Hide
all getParameterNames to get a list of parameter names known to the
DOM implementation. Call getParameter( name ) to get the current setting
of each supposedly known parameter.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
getParameter should never reject a parameter name from getParameterNames
as unknown (or getParameterNames should never return an unknown
parameter).

ACTUAL -
(See exact error below.)

getParameter throws a FEATURE_NOT_FOUND DOMException, saying it
doesn't recognize the feature name even though the feature name came
right from the DOM implementation.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
org.w3c.dom.DOMException: FEATURE_NOT_FOUND: The parameter
http://xml.org/sax/features/validation is not recognized.
at com.sun.org.apache.xerces.internal.dom.DOMConfigurationImpl.getParameter(DOM
ConfigurationImpl.java:863)
at prototype.ExploreDOM.main(Bug.java:29)
Exception in thread "main"


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------


import javax.xml.parsers.*;

import org.w3c.dom.*;


class Bug
{

    public static void main( String[] args )
throws Exception
    {
DocumentBuilder builder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();

DOMConfiguration config = builder.newDocument().getDomConfig();
{
DOMStringList names = config.getParameterNames();
for ( int sx = 0; sx < names.getLength(); sx++ ) {
String name = names.item( sx );
Object value = config.getParameter( name );
// Throws exception:
// org.w3c.dom.DOMException: FEATURE_NOT_FOUND: The parameter
http://xml.org/sax/features/validation is not recognized.
// at com.sun.org.apache.xerces.internal.dom.DOMConfigurationImpl.getParameter(
DOMConfigurationImpl.java:863)
// at prototype.ExploreDOM.main(Bug.java:29)
}
}
    } // main( String[] )


} // class Bug



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Venugopal Rao K made changes - 12/Jul/04 07:04 AM
Field Original Value New Value
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]