[sc34wg3] TMCL and MAX_INT

Graham Moore gra at networkedplanet.com
Mon Feb 23 06:47:19 EST 2009


If we go for card topics, how do we write the processing prose?

If someone creates a topic '1-7' will other processors know how to
deconstruct the 'mini-markup'? Isnt this kind of the same as just
using string occurrences? But with more plumbing.

What I do like about this approach is that for 99% the basic provided
card topics will be enough. What I don't like is that it feels heavy
to have topics for what are very small 'inline' properties of a
constraint.

2009/2/23 Lars Marius Garshol <larsga at garshol.priv.no>:
>
> * Graham Moore
>>
>> Have optional params on the templates and in the ctm / tmdm the max is
>> simply missing, meaning that its unlimited. I believe the TMQL
>> semantics already works along these lines.
>>
>> This means we need IF in ctm?
>
> If we're going to take this route we need optional params + IF, yes.
>
> So
>
> def plays-role($assoctype, $roletype, $topictype, $cardmin, $cardmax)
>   ?c isa roleplayer-constraint ;
>     card-min: $cardmin ;
>     card-max: $cardmax ;
>     applies-to(?c : constraint-role, $assoctype : assoctype-role) ;
>     applies-to(?c : constraint-role, $roletype : roletype-role) ;
>     applies-to(?c : constraint-role, $topictype : topictype-role) .
> end
>
> would instead become
>
> def plays-role($assoctype, $roletype, $topictype, $cardmin, $cardmax?)
>   ?c isa roleplayer-constraint ;
>     card-min: $cardmin ;
>   if $cardmax
>     card-max: $cardmax ;
>   end
>     applies-to(?c : constraint-role, $assoctype : assoctype-role) ;
>     applies-to(?c : constraint-role, $roletype : roletype-role) ;
>     applies-to(?c : constraint-role, $topictype : topictype-role) .
> end
>
> Or something like that. Raises tricky questions, though. How do you
> work the IF into the existing grammar and at what level? Should there
> be AND and OR etc in IF? What happens if you parse something that has
> a reference to an undefined variable?
>
> I'm not sure this is a good idea. To me using cardinality topics still
> seems like the simplest solution.
>
> --Lars M.
> http://www.garshol.priv.no/blog/
> http://www.garshol.priv.no/tmphoto/
>
>
>
> _______________________________________________
> sc34wg3 mailing list
> sc34wg3 at isotopicmaps.org
> http://www.isotopicmaps.org/mailman/listinfo/sc34wg3
>



-- 
Graham Moore, Director, Networked Planet Limited
Editor XTM 1.0, ISO13250 (TopicMaps) -2,-3, TMCL
e: graham.moore at networkedplanet.com
w: www.networkedplanet.com
t: +44 1865 811131
m: +44 7769658611 (UK)
m: +47 45271713   (Norway)

Networked Planet Limited is registered in England and Wales, no. 5273377


More information about the sc34wg3 mailing list