< prev index next >

test/javax/xml/jaxp/unittest/parsers/Bug4967002.java

Print this page




  84         final String aSchemaLanguage = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
  85         final String aSchemaSource = "http://java.sun.com/xml/jaxp/properties/schemaSource";
  86 
  87         docBFactory.setAttribute(aSchemaLanguage, "http://www.w3.org/2001/XMLSchema");
  88         // System.out.println("---- Set schemaLanguage: " +
  89         // docBFactory.getAttribute(aSchemaLanguage));
  90         if (setSrc) {
  91             docBFactory.setAttribute(aSchemaSource, new InputSource(new StringReader(schemaSource)));
  92             // System.out.println("---- Set schemaSource: " +
  93             // docBFactory.getAttribute(aSchemaSource));
  94         }
  95 
  96         try {
  97             docBFactory.newDocumentBuilder();
  98             Assert.fail("ParserConfigurationException expected");
  99         } catch (ParserConfigurationException pce) {
 100             return; // success
 101         }
 102     }
 103 }
 104 


  84         final String aSchemaLanguage = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
  85         final String aSchemaSource = "http://java.sun.com/xml/jaxp/properties/schemaSource";
  86 
  87         docBFactory.setAttribute(aSchemaLanguage, "http://www.w3.org/2001/XMLSchema");
  88         // System.out.println("---- Set schemaLanguage: " +
  89         // docBFactory.getAttribute(aSchemaLanguage));
  90         if (setSrc) {
  91             docBFactory.setAttribute(aSchemaSource, new InputSource(new StringReader(schemaSource)));
  92             // System.out.println("---- Set schemaSource: " +
  93             // docBFactory.getAttribute(aSchemaSource));
  94         }
  95 
  96         try {
  97             docBFactory.newDocumentBuilder();
  98             Assert.fail("ParserConfigurationException expected");
  99         } catch (ParserConfigurationException pce) {
 100             return; // success
 101         }
 102     }
 103 }

< prev index next >