68 }
69
70 /*
71 * When processContents="lax", validation will be performed when the element
72 * is declared in the schema.
73 */
74 @Test(expectedExceptions = SAXParseException.class)
75 public void testProcessContentsLax() throws Exception {
76 validator.validate(new StreamSource(getUri("ProcessContents-lax-error.xml")));
77 }
78
79 /*
80 * Get the URI of the file, which is in the same path as this class
81 */
82 private String getUri(String fileName) throws URISyntaxException {
83 return this.getClass().getResource(fileName).toURI().toASCIIString();
84 }
85
86 private Validator validator;
87 }
88
|
68 }
69
70 /*
71 * When processContents="lax", validation will be performed when the element
72 * is declared in the schema.
73 */
74 @Test(expectedExceptions = SAXParseException.class)
75 public void testProcessContentsLax() throws Exception {
76 validator.validate(new StreamSource(getUri("ProcessContents-lax-error.xml")));
77 }
78
79 /*
80 * Get the URI of the file, which is in the same path as this class
81 */
82 private String getUri(String fileName) throws URISyntaxException {
83 return this.getClass().getResource(fileName).toURI().toASCIIString();
84 }
85
86 private Validator validator;
87 }
|