Package org.fa.tei.validation
Class RngValidationHelper
java.lang.Object
org.fa.tei.validation.RngValidationHelper
Can validate xml against rng schema generated from fryske akademy tei dictionaries customization
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Schemastatic voidvalidate all files in first file or directory argument (no exceptions => ok)static voidperform rng validation and validation based on schematron.static voidvalidateRngSchematron(URL xml) perform rng validation and validation based on schematron.static voidvalidateSchematron(String xml) validates using schematron onlystatic voidvalidateSchematron(URL xml) validates using schematron onlystatic voidvalidateXml(InputStream xml) static voidvalidateXml(Reader xml) static voidvalidateXml(String xml) static voidvalidateXml(URL xml) preferably usevalidateRngSchematron(URL)
-
Constructor Details
-
RngValidationHelper
public RngValidationHelper()
-
-
Method Details
-
getSchema
-
validateXml
- Throws:
SAXExceptionIOException
-
validateXml
- Throws:
SAXExceptionIOException
-
validateXml
preferably usevalidateRngSchematron(URL)- Parameters:
xml-- Throws:
SAXExceptionIOException
-
validateRngSchematron
public static void validateRngSchematron(URL xml) throws IOException, SAXException, name.dmaus.schxslt.SchematronException perform rng validation and validation based on schematron.- Parameters:
xml- a url (file, classpath, network...) to the xml to be validated- Throws:
SAXException- when validation fails, exception holds useful informationException- if anything goes wrongIOExceptionname.dmaus.schxslt.SchematronException
-
validateSchematron
public static void validateSchematron(URL xml) throws IOException, name.dmaus.schxslt.SchematronException validates using schematron only- Parameters:
xml-- Throws:
ExceptionIOExceptionname.dmaus.schxslt.SchematronException
-
validateRngSchematron
public static void validateRngSchematron(String xml) throws IOException, SAXException, name.dmaus.schxslt.SchematronException perform rng validation and validation based on schematron.- Parameters:
xml- the xml as a string- Throws:
SAXException- when validation fails, exception holds useful informationException- if anything goes wrongIOExceptionname.dmaus.schxslt.SchematronException
-
validateSchematron
validates using schematron only- Parameters:
xml-- Throws:
name.dmaus.schxslt.SchematronException
-
validateXml
- Throws:
SAXExceptionIOException
-
main
public static void main(String[] args) throws IOException, name.dmaus.schxslt.SchematronException, SAXException validate all files in first file or directory argument (no exceptions => ok)- Parameters:
args-- Throws:
IOExceptionname.dmaus.schxslt.SchematronExceptionSAXException
-