< prev index next >

test/javax/xml/jaxp/unittest/validation/Bug4970400.java

Print this page




  31 
  32 /*
  33  * @test
  34  * @bug 4970400
  35  * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
  36  * @run testng/othervm -DrunSecMngr=true validation.Bug4970400
  37  * @run testng/othervm validation.Bug4970400
  38  * @summary Test ValidatorHandler recognizes namespace-prefixes feature.
  39  */
  40 @Listeners({jaxp.library.BasePolicy.class})
  41 public class Bug4970400 {
  42 
  43     @Test
  44     public void test1() throws Exception {
  45         SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
  46         ValidatorHandler validatorHandler = schemaFactory.newSchema().newValidatorHandler();
  47         validatorHandler.setFeature("http://xml.org/sax/features/namespace-prefixes", false);
  48         validatorHandler.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
  49     }
  50 }
  51 


  31 
  32 /*
  33  * @test
  34  * @bug 4970400
  35  * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
  36  * @run testng/othervm -DrunSecMngr=true validation.Bug4970400
  37  * @run testng/othervm validation.Bug4970400
  38  * @summary Test ValidatorHandler recognizes namespace-prefixes feature.
  39  */
  40 @Listeners({jaxp.library.BasePolicy.class})
  41 public class Bug4970400 {
  42 
  43     @Test
  44     public void test1() throws Exception {
  45         SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
  46         ValidatorHandler validatorHandler = schemaFactory.newSchema().newValidatorHandler();
  47         validatorHandler.setFeature("http://xml.org/sax/features/namespace-prefixes", false);
  48         validatorHandler.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
  49     }
  50 }

< prev index next >