with the nice links to Schematron tutorials I thought I'd try it, esp.
as Matija a while ago posted a question on how to validate that no two
witnesses in an apparatus should be the same. Wendell, I think, gave a
Schematron rule but not really how to write the complete customisation.
So today being a rainy Saturday, I tried to make one with the above
rule; it took a bit longer than expected, then again, doesn't it always.
Follow some things that could be fixed in the Guidelines and Roma to
make the journey easier. The parametrisation that I used is at
http://nl.ijs.si/et/tmp/tei/ together with comments.
1. The TEI section on constraints and esp Schematron
is quite brief. I think it would be really nice if a (small) more or
less complete customisation were given. Right now there is no mention of
the (two) namespaces or what the URI should be; it takes a bit of
hunting to find them. The examples also use the Sinica version, I guess
because the ISO came after the section was written.
2. Roma makes a lot of assumptions on what a (Schematron) constraint
should look like, which are not mirrored by tei_odd; the text of the
Guidelines and examples there also at times contradict them. E.g. the
constraintSpec cannot be a child of schemaSpec, the pattern is
obligatory, it has to have an @id (and not @name as in the Guidelines).
In the tutorial on Roma
http://www.tei-c.org/Guidelines/Customization/use_roma.xml there is not
mention of Schematron.
3. The Roma generated .sch has some duplicate ids on patterns. On the
test XML (which is valid to RNG) I got the following errors:
> Description: The spanTo= attribute of addSpan is required. (@spanTo)
OK, but why is this not rather a part of RNG validation?
> Description: L'attribut spanTo est requis. (@spanTo) [assert]
OK, now I know it in two languages :)
> Description: You must supply at least two values for @target
> (contains(@target,' ')) [assert]
I guess the constraint was just copied from @targets..
Anyway, got to the end and can now confidently report that in Matija's
doc no two witnesses are in fact identical inside an apparatus.
Quite a relief!
Dept. of Knowledge Technologies
Jožef Stefan Institute, Ljubljana