< prev index next >

test/javax/xml/jaxp/unittest/validation/tck/Bug6963124Test.java

Print this page




  44 @Listeners({jaxp.library.FilePolicy.class})
  45 public class Bug6963124Test {
  46     static final String SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
  47     static final String SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
  48 
  49     @Test
  50     public void test() {
  51         try {
  52             SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
  53 
  54             Schema schema = schemaFactory.newSchema(new StreamSource(Bug6963124Test.class.getResourceAsStream("Bug6963124.xsd")));
  55             Assert.fail("JCK negative test");
  56         } catch (SAXException e) {
  57             // e.printStackTrace();
  58             System.out
  59                     .println("The XML Schema spec [1] states that if the {term} property of a particle is a model group with {compositor} all then {maxOccurs} of that particle must equal 1.");
  60         }
  61     }
  62 
  63 }
  64 


  44 @Listeners({jaxp.library.FilePolicy.class})
  45 public class Bug6963124Test {
  46     static final String SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
  47     static final String SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
  48 
  49     @Test
  50     public void test() {
  51         try {
  52             SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
  53 
  54             Schema schema = schemaFactory.newSchema(new StreamSource(Bug6963124Test.class.getResourceAsStream("Bug6963124.xsd")));
  55             Assert.fail("JCK negative test");
  56         } catch (SAXException e) {
  57             // e.printStackTrace();
  58             System.out
  59                     .println("The XML Schema spec [1] states that if the {term} property of a particle is a model group with {compositor} all then {maxOccurs} of that particle must equal 1.");
  60         }
  61     }
  62 
  63 }

< prev index next >