[tmcl-wg] Template and Expression layers: both needed for tmcl?
Robert Barta
tmcl-wg@isotopicmaps.org
Mon, 24 Mar 2003 21:20:05 +1000
On Sat, Mar 22, 2003 at 09:19:12PM +0900, Mary Nishikawa wrote:
> *Robert Barta
>
> commenting on section 1.1.2.1:
> http://www.isotopicmaps.org/tmcl/requirements/
>
> I do see the question whether there should be a
>
> TL (template layer), and a
> EL (expression layer)
>
> independent whether the can be morphed into XML or not.
>
>
> *MN
> Comments Please!!! thanks
I still like it :-)
Just to demonstrate the - probably - obvious thing, have a look
at the OSL template:
<topic>
<instanceOf>
<internalTopicRef href="#TMTT_Standard"/>
</instanceOf>
<baseName min="1" max="Inf">
<scope></scope>
</baseName>
</topic>
This TL could be translated into a expression ala:
forall $t [ * (TMTT_Standard) ]
=> exists $t [ bn : * ]
--
If we add the occurrence to it:
<topic>
<instanceOf>
<internalTopicRef href="#TMTT_Standard"/>
</instanceOf>
<occurrence external="yes">
<instanceOf>
<internalTopicRef href="#TMOR_Specification"/>
</instanceOf>
</occurrence>
<occurrence external="yes">
<instanceOf>
<internalTopicRef href="#TMOR_Homepage"/>
</instanceOf>
</occurrence>
</topic>
then we would write
forall $x [ * (TMTT_Standard) ]
forall $x [ oc ($t): * ]
=> exists $x [ oc ($t =~ TMOR_Specification) : * ]
OR
exists $x [ oc ($t =~ TMOR_Homepage) : * ]
\rho