[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: Thu, 25 Jun 2015 14:59:08 -0000

> Of course that is more in agreement than in disagreement with your
> points. One of the implications of your breakdown, in fact, is the way
> it raises the question of scope. Historically, validation has been
> looked on as something that could be done on each instance
> independently and without reference to a broader set of instances (or
> indeed other 'dynamic' aspects of system state or context). But that
> isn't really the way the world works, at least not all the time.

That reminds me of a challenge in a past project where we wanted to validate a
document against different rules at different stages of its life-cycle.
(Whatbs acceptable as a submission from an author isnbt necessarily
acceptable as a finished publication).

Managing multiple schemas for the same instances is very cumbersome - how do
you keep them in sync?

One thing Ibve played with in Saxonbs XSD implementation is the idea that
a schema should be parameterized. Currently that only extends to variables in
assertions, but Ibve always thought it could and should be generalized,

_minOccurs=b{if ($status=bdraftb) then 0 else 1}b

Meanwhile, if you need to do this kind of thing, there is always XSLT (either
to transform the instances, or to transform the schemasb&)

Michael Kay

Current Thread