- 
    Enhancement 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    5.0
- 
        b36
- 
        generic
- 
        generic
- 
        Verified
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-2078497 | 1.3.0 | Kohsuke Kawaguchi | P3 | Closed | Fixed | 1.3 | 
                    Name: eaR10174			Date: 12/18/2003
The method
javax.xml.validation.ValidatorHandler.setFeature()
throws SAXNotRecognizedException in case when a feature name is
"http://xml.org/sax/features/namespace-prefixes". The method should accept this name according
to the javadoc.
The bug affects new JCK1.5 tests (not integrated yet):
api/javax_xml/validation/ValidatorHandler/index.html#GetSetFeature[GetSetFeature005]
api/javax_xml/validation/ValidatorHandler/index.html#GetSetFeature[GetSetFeature006]
api/javax_xml/validation/ValidatorHandler/index.html#GetSetFeature[GetSetFeature008]
api/javax_xml/validation/ValidatorHandler/index.html#GetSetFeature[GetSetFeature009]
The following test fails running on JDK 1.5.0-beta-b31.
See below the test source and the execution log:
------------------------------------test.java-----------------------------
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.ValidatorHandler;
public class test {
SchemaFactory schemaFactory =
SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
public static void main(String argv[]) {
test t = new test();
t.run();
}
public void run() {
try {
ValidatorHandler validatorHandler =
schemaFactory.newSchema().newValidatorHandler();
validatorHandler.setFeature("http://xml.org/sax/features/namespace-prefixes",
false);
System.out.println("OK");
} catch (Exception e) {
System.out.print("Failed. ");
e.printStackTrace();
}
}
}
--------------------------------------------------------------------------
% java -showversion test
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b31)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b31, mixed mode)
Failed. org.xml.sax.SAXNotRecognizedException: http://xml.org/sax/features/namespace-prefixes
at javax.xml.validation.ValidatorHandler.setFeature(ValidatorHandler.java:380)
at test.run(test.java:15)
at test.main(test.java:9)
-------------------------------------------------------------------------
======================================================================
            
The method
javax.xml.validation.ValidatorHandler.setFeature()
throws SAXNotRecognizedException in case when a feature name is
"http://xml.org/sax/features/namespace-prefixes". The method should accept this name according
to the javadoc.
The bug affects new JCK1.5 tests (not integrated yet):
api/javax_xml/validation/ValidatorHandler/index.html#GetSetFeature[GetSetFeature005]
api/javax_xml/validation/ValidatorHandler/index.html#GetSetFeature[GetSetFeature006]
api/javax_xml/validation/ValidatorHandler/index.html#GetSetFeature[GetSetFeature008]
api/javax_xml/validation/ValidatorHandler/index.html#GetSetFeature[GetSetFeature009]
The following test fails running on JDK 1.5.0-beta-b31.
See below the test source and the execution log:
------------------------------------test.java-----------------------------
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.ValidatorHandler;
public class test {
SchemaFactory schemaFactory =
SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
public static void main(String argv[]) {
test t = new test();
t.run();
}
public void run() {
try {
ValidatorHandler validatorHandler =
schemaFactory.newSchema().newValidatorHandler();
validatorHandler.setFeature("http://xml.org/sax/features/namespace-prefixes",
false);
System.out.println("OK");
} catch (Exception e) {
System.out.print("Failed. ");
e.printStackTrace();
}
}
}
--------------------------------------------------------------------------
% java -showversion test
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b31)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b31, mixed mode)
Failed. org.xml.sax.SAXNotRecognizedException: http://xml.org/sax/features/namespace-prefixes
at javax.xml.validation.ValidatorHandler.setFeature(ValidatorHandler.java:380)
at test.run(test.java:15)
at test.main(test.java:9)
-------------------------------------------------------------------------
======================================================================
- backported by
- 
                    JDK-2078497 ValidationHandler.setFeature() does not recognized namespace-prefixes feature -           
- Closed
 
-         
- relates to
- 
                    JDK-4997820 ValidationHandler: xmlns* are not listed in Attributes object -           
- Closed
 
-         
- 
                    JDK-4997822 ValidationHandler: xmlns* are not listed in Attributes object -           
- Closed
 
-