supportedXslt1Processors.add("com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
supportedXslt1Processors.add("net.sf.saxon.TransformerFactoryImpl");
for (String processor : supportedXslt1Processors) {
PropertyReader.setProperty("xml.transform.TransformerFactory", processor);
for (String sVersion : getSupportedVersions()) {
DDMSVersion version = DDMSVersion.getVersionFor(sVersion);
Resource resource = versionToResourceMap.get(sVersion);
String ddmsNamespace = resource.getNamespace();
String resourceName = Resource.getName(version);
List<ValidationMessage> messages = resource.validateWithSchematron(new File("data/test/" + sVersion
+ "/testSchematronXslt1.sch"));
assertEquals(version.isAtLeast("4.0.1") ? 3 : 2, messages.size());
String text = "A DDMS Resource must have an unknownElement child.";
String locator = "/*[local-name()='" + resourceName + "' and namespace-uri()='" + ddmsNamespace + "']";
assertErrorEquality(text, locator, messages.get(0));
int originalWarningIndex = version.isAtLeast("4.0.1") ? 2 : 1;
text = "Members of the Uri family cannot be publishers.";
locator = "/*[local-name()='" + resourceName + "' and namespace-uri()='" + ddmsNamespace + "']"
+ "/*[local-name()='publisher' and namespace-uri()='" + ddmsNamespace + "']" + "/*[local-name()='"
+ Person.getName(version) + "' and namespace-uri()='" + ddmsNamespace + "']"
+ "/*[local-name()='surname' and namespace-uri()='" + ddmsNamespace + "']";
assertWarningEquality(text, locator, messages.get(originalWarningIndex));
if (version.isAtLeast("4.0.1")) {
text = "Members of the Uri family cannot be publishers.";
locator = "/*[local-name()='" + resourceName + "' and namespace-uri()='" + ddmsNamespace + "']"
+ "/*[local-name()='metacardInfo' and namespace-uri()='" + ddmsNamespace + "']"
+ "/*[local-name()='publisher' and namespace-uri()='" + ddmsNamespace + "']"
+ "/*[local-name()='" + Person.getName(version) + "' and namespace-uri()='" + ddmsNamespace