public class SchematronTests extends DataFixture
xml-model processing
instruction, where the value of the "schematypens" data item is the name of
the Schematron namespace (see sample listing below).sch test run argument;Using the xml-model PI to refer to a Schematron schema
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://example.org/constraints.sch"
schematypens="http://purl.oclc.org/dsdl/schematron"
phase="#ALL"?>
The processing instruction takes precedence if multiple schema references are
found.
Sources
dataFile, model, observation_type_category, observation_type_complex, observation_type_count, observation_type_geometry, observation_type_measurement, observation_type_swe_array, observation_type_swe_simple, observation_type_temporal, observation_type_truth, originalSubject, Resource_GML_Path, Resource_SWE_Path, testSubject, testSubjectUri| Constructor and Description |
|---|
SchematronTests() |
| Modifier and Type | Method and Description |
|---|---|
void |
createSchematronValidator(org.testng.ITestContext testContext)
Attempts to construct a Schematron validator from a schema reference
given in (a) the GML data file, or (b) a test run argument (in the ISuite
context).
|
(package private) Map<String,String> |
getXmlModelPIData(File dataFile)
Extracts the data items from the
xml-model processing
instruction. |
(package private) boolean |
isSchematronReference(Map<String,String> piData)
Indicates whether or not the given PI data includes a Schematron schema
reference.
|
boolean |
xpathHasNodes(String strXPath) |
CheckObservationTypeCategory, CheckObservationTypeCount, CheckObservationTypeMeasurement, CheckObservationTypeTruth, CheckXPath2, CheckXPath2Modified, CreateValidator, CreateValidatorFromXSD, evaluateXPath2Modified, generateXPathExpression, GetFileViaResourcePath, GetResultTypeHref, obtainTestSubject, SchemaElement, setDataFile, setSchemaModelpublic void createSchematronValidator(org.testng.ITestContext testContext)
testContext - The test set context.public boolean xpathHasNodes(String strXPath) throws XPathExpressionException
XPathExpressionExceptionboolean isSchematronReference(Map<String,String> piData)
piData - A Map containing PI data (pseudo-attributes).true if the "schematypens" pseudo-attribute has the value
defined in Namespaces.SCHMap<String,String> getXmlModelPIData(File dataFile)
xml-model processing
instruction. The PI must appear before the document element.dataFile - A File containing the GML instance.null
if the PI is not present.Copyright © 2021 Open Geospatial Consortium. All rights reserved.