count patterns as fired rules->testing UBL positive
This commit is contained in:
@@ -18,6 +18,7 @@ import javax.xml.xpath.XPathConstants;
|
||||
import javax.xml.xpath.XPathExpression;
|
||||
import javax.xml.xpath.XPathFactory;
|
||||
|
||||
import com.helger.schematron.svrl.jaxb.ActivePattern;
|
||||
import org.mustangproject.XMLTools;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -406,7 +407,7 @@ public class XMLValidator extends Validator {
|
||||
.setLocation(failedAssert.getLocation()).setCriterion(failedAssert.getTest()).setSection(section)
|
||||
.setPart(EPart.fx));
|
||||
failedRules++;
|
||||
} else if (object instanceof FiredRule) {
|
||||
} else if ((object instanceof FiredRule)||(object instanceof ActivePattern)) {
|
||||
firedRules++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ public class XMLValidatorTest extends ResourceCase {
|
||||
|
||||
Source source = Input.fromString("<validation>" + xv.getXMLResult() + "</validation>").build();
|
||||
String content = xpath.evaluate("/validation/summary/@status", source);
|
||||
// assertEquals("valid", content);
|
||||
assertEquals("valid", content);
|
||||
|
||||
|
||||
} catch (IrrecoverableValidationError e) {
|
||||
|
||||
Reference in New Issue
Block a user