[OAI-implementers] Validating ListMetadataFormats
Steven Bird <email@example.com>
Wed, 20 Feb 2002 16:32:41 EST
> I would like to use an XML validation language (e.g. XML Schema) to test
> that the document returned by ListMetadataFormats includes a specific
> format. The return typically lists multiple formats, and I just want to
> check that the list includes one specific format, e.g.:
> The ListMetadataFormats container is supposed to have set semantics. I
> guess I need a set-membership test, and it also needs to work on element
> content (not just element names, attribute names, or attribute values).
Leigh Dodds replied:
> You should take a look at Schematron  which is an validation language
> implemented using XSLT. ... Schematron provides the kinds of constraints
> checking that you require ...
Actually, I don't believe that it possible to implement a set-membership
test using schematron. As I understand it, schematron only lets you assert
implication relations between xpath expressions.
Here is a simpler statement of the problem. Check that one of the
elements in the following list is OLAC (two versions):
The schematron rule context is just "/set", and the assertion (which cannot
be expressed in schematron) is that one of the <elt> elements contains
"olac" or <olac/>.
All of the other OLAC requirements can be checked with schematron, and
here is the schematron code I wrote a couple of weeks ago:
Thus, I think we are left writing programs to validate the response to the
Identify and ListMetadataFormats requests. I'd be glad to be proven wrong,
so please let me know if schematron or some other XML validation language
can do a set-membership test.
Assoc Director, LDC; Adj Assoc Prof, CIS & Linguistics
Linguistic Data Consortium, University of Pennsylvania
3615 Market St, Suite 200, Philadelphia, PA 19104-2608