public class ValidationUtils extends Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Constructs a SchematronValidator that will check an XML resource against the rules defined in a Schematron schema.
Extracts a set of XML Schema references from a source XML document.
public static org.opengis.cite.validation.SchematronValidator buildSchematronValidator(String schemaRef, String phase)
schemaRef- A reference to a Schematron schema; this is expected to be a relative or absolute URI value, possibly matching the system identifier for some entry in an entity catalog.
phase- The name of the phase to invoke; if
nullthen all patterns are active.
nullif the validator cannot be constructed (e.g. invalid schema reference or phase name).
public static Set<URI> extractSchemaReferences(Source source, String baseURI) throws XMLStreamException
source- The source instance to read from; its base URI (systemId) should be set.
baseURI- An alternative base URI to use if the source does not have a system identifier set or if its system id is a
fileURI. This will usually be the URI used to retrieve the resource; it may be null.
XMLStreamException- If an error occurs while reading the source instance.
Copyright © 2020 Open Geospatial Consortium. All rights reserved.