Methods Summary |
---|
private void | checkValidity(java.io.File f)
System.out.println("========== Checking " + f.getAbsolutePath() + "=================");
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(f);
assertTrue(doc != null);
|
public static void | main(java.lang.String[] args)
TestXSD tester = new TestXSD("TestXSD");
tester.setUp();
tester.testWSDD();
|
private void | recurse(java.io.File f)
if (f.isDirectory()) {
File[] files = f.listFiles();
for (int i = 0; i < files.length; i++) {
recurse(files[i]);
}
} else if (f.getName().endsWith(".wsdd")) {
checkValidity(f);
}
|
protected void | setUp()
String schemaSource = "wsdd/WSDD.xsd";
// Set namespaceAware to true to get a DOM Level 2 tree with nodes
// containing namesapce information. This is necessary because the
// default value from JAXP 1.0 was defined to be false.
dbf.setNamespaceAware(true);
dbf.setValidating(true);
dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
// Specify other factory configuration settings
File f = new File(schemaSource);
dbf.setAttribute(JAXP_SCHEMA_SOURCE, f.toURL().toExternalForm());
|
public static junit.framework.Test | suite()
return new TestSuite(TestXSD.class);
|
public void | testWSDD()
File f = new File(".");
recurse(f);
|