[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Reasons for using XSLT to validate XML instances?

Subject: Re: [xsl] Reasons for using XSLT to validate XML instances?
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Jun 2015 19:53:13 -0000

We use XSLT and XQuery (as well as XSD) to validate the XSLT and XQuery test

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
benvironment nameb 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

This works much better in 3.0 of course, because you really need try/catch.

Michael Kay

> On 19 Jun 2015, at 16:50, Costello, Roger L. costello@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> 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

Current Thread