Permalink
Browse files

Add a cx:version attribute to the p:validate-with-xml-schema step

to specify the schema version.
  • Loading branch information...
ndw committed Aug 15, 2014
1 parent d4b348b commit b79a774da1a47db708f72ef89552f88a55cd528d
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/com/xmlcalabash/library/ValidateWithXSD.java
@@ -74,6 +74,7 @@
private static final QName _try_namespaces = new QName("", "try-namespaces");
private static final QName _line = new QName("line");
private static final QName _column = new QName("column");
private static final QName cx_version = new QName(XProcConstants.NS_CALABASH_EX, "version");
private static final Class<?>[] paramTypes = new Class<?>[] {};
private ReadablePipe source = null;
@@ -120,6 +121,11 @@ public void run() throws SaxonApiException {
public void validateWithSaxonSA(SchemaManager manager) throws SaxonApiException {
fine(step.getNode(), "Validating with Saxon");
String xsdVersion = step.getExtensionAttribute(cx_version);
if (xsdVersion != null) {
manager.setXsdVersion(xsdVersion);
}
Configuration config = runtime.getProcessor().getUnderlyingConfiguration();
runtime.getConfigurer().getSaxonConfigurer().configXSD(config);

0 comments on commit b79a774

Please sign in to comment.