[tmcl-wg] Topic Map Constraint Language and Schematron
Robert Barta
tmcl-wg@isotopicmaps.org
Wed, 14 May 2003 09:35:24 +1000
On Mon, May 12, 2003 at 11:17:12PM +0100, Lars Marius Garshol wrote:
> * Rick Jelliffe
> | WG members may be interested in a possible tie-in between Schematron
> | and TMCL.
> 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.)
I think our conclusion was that (a) it is possible if the software
understands the semantics but (b) that this is MUCH more difficult to
write.
My concern is, though, if we insist on introspection (or at least the
way I understand Lars), then we will have to end up with something
elegant as Godzilla on ice (aka XML schema). :-)
> 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>
If you already go this path why not morph it into
<assert>
<context>topic</context>
<constraint>tolog query</constraint>
...
</assert>
or equivalently,
<schema ...>
<pattern name=".....">
<rule context="topic">
<assert test="tolog query">...error message here...</assert>
</rule>
</pattern>
</schema>
?
\rho