We use XSLT and XQuery (as well as XSD) to validate the XSLT and XQuery test
suites.
There may be other ways of doing it, but XSLT/XQuery are by far the easiest way
of validating a collection of documents, e.g. checking that every test name is
unique within a collection of several hundred test sets, or that every
“environment name” referenced from a test case actually exists somewhere in the
test suite, typically in a different XML document.
We also use XSLT and XQuery to control XSD validation of the document set: for
example an XSLT script can check metadata to see what schema a particular
instance document is supposed to be valid against, and invoke XSD validation
accordingly.
This works much better in 3.0 of course, because you really need try/catch.
Michael Kay
Saxonica
On 19 Jun 2015, at 16:50, Costello, Roger L. costello(_at_)mitre(_dot_)org
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
Hi Folks,
XML Schema can validate XML instances.
Schematron can validate XML instances.
Is there ever a situation where it would be preferable to use XSLT to
validate XML instances?
/Roger
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--