[tmcl-wg] Relax NG Compact Syntax and TMCL-light

Dmitry tmcl-wg@isotopicmaps.org
Sun, 28 Dec 2003 22:13:26 -0500


I was reading recently about Relax NG Compact Syntax. I think that
TMCL-light can reuse many ideas from this specification.

I think that it is possible to have something like this (Opera OSL-based
schema is used as prototype for this sample):


[match="strict" combination_policy="prefer_explicit"]
topic i"http://psi.ontopia.net/opera/#composer"{
 [min="1" max="1"]
 baseName{text},

 [min="1" max="1"]
 baseName{text@i"http://psi.ontopia.net/opera/#normal" },

 [min="1" max="1" external="false"]
 occurrence ihttp://psi.ontopia.net/opera/#born{xsd:dateTime},

 [min="1" max="1" external="true"]
 occurrence ihttp://psi.ontopia.net/opera/#illustration{xsd:anyURI},

 [min="1" max="unbound"]
 roleOf ihttp://psi.ontopia.net/opera/#composer{
  association ihttp://psi.ontopia.net/opera/#composed-by{}
 }
}

Schema author typically provides only partial type descriptions. TMCL engine
should have ability to propagate constraints based on type hierarchy. Schema
author just can provide additional descriptions in subtype.  "Real" type
description is combination of partial type descriptions. Engine can
(re)calculate "current" type schema in context.  Schema author can
explicitly redefine some descriptions in subtype. In this case TMCL engine
will use this new explicit description instead of inherited or deduced
descriptions.  This is an example of constraints policies which can be used
by engine when combining several partial type descriptions.


Any comments?


Dmitry