[
Lists Home |
Date Index |
Thread Index
]
> Interestingly the RELAX NG spec says nothing about the process of
> tying schema to instance - it just says what the RELAX NG processor
> should do once it gets them. I guess the idea is to leave it to the
> market to decide the best ways to do this. James?
Certainly there is a need to be able to associate a schema with a document.
We discussed this during the development of RELAX NG, but we reached the
conclusion that it was better not to include this functionality as part of
the schema language. The main reason is that the problem of associating a
schema with a document is really a special case of the general problem of
associating processing with a document. This is particularly the case
since we don't regard RELAX NG as the one true schema language. It's just
one of many validation technologies that are each useful in different
circumstances. You might want to associate a Schematron with a document or
XInclude processing or an XSLT stylesheet or any number of other possible
evolving technologies (e.g. something like Regular Fragmentations).
Although it's tempting to make a special case for the technology you're
developing (and I succumbed to that temptation in the past with
xsl-stylesheet), it's really not a good idea in the long-term; it just
doesn't make any sense for each of these processing technologies to define
their own separate mechanism for associating their processing with a
document. Furthermore, this can't solve the problem of specifying what
order you want these processes to be applied in. Do you do XInclude then
XSD validation or vice-versa? I don't think there's a single right answer.
I could even imagine wanting to do both: validate against a fairly loose
schema first to constrain the use of XInclude, then do XInclude and then do
validation against a tighter schema.
James
|