[tmcl-wg] Topic Map Constraint Language and Schematron
Lars Marius Garshol
tmcl-wg@isotopicmaps.org
12 May 2003 23:17:12 +0100
Hi Rick,
* Rick Jelliffe
|
| WG members may be interested in a possible tie-in between Schematron
| and TMCL.
Indeed, we are. The idea of making TMCL into a simple set of
(selector, restriction) pairs, where both selector and restriction are
queries in some topic map query language, has been floating in the
topic map community for quite a while now, clearly inspired by the
Schematron. (Not sure who spoke of it first. Quite likely many people
thought of it independently after the Schematron was published.)
I think the idea is elegant, but I worry that if TMCL is made into a
simple TMQL "client" in this way we may find that our ability to
introspect schemas is limited by this approach. (I've discussed this
with Robert, who does not appear to agree, several times without
really reaching any conclusion.)
In the same vein I wonder whether you've found that writing a complete
schema for some vocabulary in this fashion is feasible? To me it seems
that it may be difficult to cover all corner cases and really describe
the vocabulary fully with this approach. (I do agree that it is very
good for expressing the more complicated constraints.)
My feeling so far has been that we would probably be best off if we
could provide a combination of some more declarative/implicit language
(like OSL[1] in general approach, if not necessarily in detail). To
this end I put together a trivial proposal for extending OSL with such
a capability. Basically the <topic> element would have had two
additional element(s)
<assert>
<constraint>...tolog query here...</constraint>
<message>...error message here...</message>
</assert>
and a similar <deny> where the former would require at least one match
to the query and the latter none. These constraints would implicitly
apply to all topics of the defined class. (One might perhaps also
allow these elements to appear within the <schema> top-level element.)
That was basically a dump of the contents of my brain relating to this
subject. Would be interested to hear what anyone thinks of it. :)
[1] Similar to DTDs/XSDL/RELAX-NG in an XML context.
--
Lars Marius Garshol, Ontopian <URL: http://www.ontopia.net >
GSM: +47 98 21 55 50 <URL: http://www.garshol.priv.no >