diff --git a/src/utilities/xml/XMLValidator.cpp b/src/utilities/xml/XMLValidator.cpp index daa458496a..46964a8d29 100644 --- a/src/utilities/xml/XMLValidator.cpp +++ b/src/utilities/xml/XMLValidator.cpp @@ -73,7 +73,7 @@ openstudio::path XMLValidator::schematronToXslt(const openstudio::path& schemaPa // This replicates what happens when you do: // from lxml.isoschematron import Schematron; - // s = Schematron(file='schematron.sct', store_xslt=True) + // s = Schematron(file='schematron.sch', store_xslt=True) // with open('schematron.xslt', 'w') as f: // f.write(str(s._validator_xslt)) @@ -170,7 +170,7 @@ XMLValidator::XMLValidator(const openstudio::path& schemaPath) : m_schemaPath(op } else if (schemaPath.extension() == ".xslt") { m_validatorType = XMLValidatorType::XSLTSchematron; logAndStore(Trace, "Treating schema as a XLST StyleSheet that derives from a Schematron."); - } else if ((schemaPath.extension() == ".xml") || (schemaPath.extension() == ".sct")) { + } else if ((schemaPath.extension() == ".xml") || (schemaPath.extension() == ".sch")) { m_validatorType = XMLValidatorType::Schematron; logAndStore(Trace, "Treating schema as a Schematron, converting to an XSLT StyleSheet."); // Let's use a temporary directory for this, so we avoid having two instances trying to write to the same file and we avoid issues where the @@ -262,7 +262,7 @@ bool XMLValidator::validate(const openstudio::path& xmlPath) { LOG_AND_THROW(logMessage); } - if (xmlPath.extension() == ".xml") { + if (xmlPath.extension() == ".xml" || xmlPath.extension() == ".sch" || xmlPath.extension() == ".xsd") { auto t_xmlPath = openstudio::filesystem::system_complete(xmlPath); m_xmlPath = t_xmlPath; } else { diff --git a/src/utilities/xml/XMLValidator.hpp b/src/utilities/xml/XMLValidator.hpp index 6296523e31..a8ccd7c2ae 100644 --- a/src/utilities/xml/XMLValidator.hpp +++ b/src/utilities/xml/XMLValidator.hpp @@ -43,7 +43,7 @@ class UTILITIES_API XMLValidator * * The schemaPath extension is used to determine the type of validation to perform: * - `*.xsd` => XSD - * - `*.xml` or `*.sct` => Schematron (convert to XSLT then validate) + * - `*.xml` or `*.sch` => Schematron (convert to XSLT then validate) * - `*.xslt` => Schematron that is already transformed to an XSLT stylesheet */ explicit XMLValidator(const openstudio::path& schemaPath); ~XMLValidator();