[sc34wg3] Template parameters in CTM

Lars Marius Garshol larsga at garshol.priv.no
Fri Jan 29 09:30:12 EST 2010


Lars Heuer and I are discussing a corner case in CTM, and whether it should be legal or not. In other words, we're not discussing what the spec says, but what it *should* say. You can see some the discussion on
  http://projects.topicmapslab.de/issues/1908

Explaining the issue takes a few lines, so please bear with me.

The following is obviously legal:

def instance-of($t, $tt)
  $t isa $tt.
end

foo instance-of( http://en.wikipedia.org/wiki/Person ) .

Here, the URI is interpreted as a subject identifier reference to a topic. No problem. This is also legal:

def has-psi($t, $psi)
  $t $psi .
end

foo has-psi( http://en.wikipedia.org/wiki/Isaac_Newton ).

Here, the URI is interpreted as a subject identifier added to the topic. Again, no problem.

We could also do this:

foo instance-of( = http://example.org/not-good-modelling ).

Here the parameter is interpreted as a topic referred to by its subject locator. Obviously fine. But what about this? (And please don't be confused by the name of the template.)

foo has-psi( = http://example.org/some-resource ).

Is this an error because we are passing a topic to $psi, which cannot be a topic because of how it's used inside the template, or is it OK because we're really passing a subject locator assignment, so that it becomes equivalent to:

foo = http://example.org/some-resource .

Thoughts, anyone?

--Lars M.
http://www.garshol.priv.no/tmphoto/
http://www.garshol.priv.no/blog/



More information about the sc34wg3 mailing list