Re: TMQL: Minor issue: Plurals for paths
Lars Heuer <[email protected]>
| Newsgroups | gmane.text.xml.xtm.general |
|---|---|
| Organization | Semagia |
| Message-ID | <[email protected]> |
Hi Xuân,
[...]
> Well, as far as I can recall, the idea is that an axis is actually a
> function, and functions returning a set of something should be named in
> plural. This is common (and I think good) practice, like in Python, the
[...]
> Actually sticking to this naming convention allows to distinguish
> between "Role#player" and "Association#players"
I see. I am still not convinced that we should use plurals. I don't
see why association/player would be a problem.
One reason (aside from the already mentioned ones) I like singular
terms: I don't have to think about it. If there is a rule "axis names
are singular terms", I don't have to think about the item on the left
side of the slash. Further it would allow us to write rather generic
code:
def want($x):
return $x/type::*[count(./name::*) = 1)]
That function would work with topics, assocs, etc. If the axis names
differ, the user has to write one version for topics and one for all
other Topic Maps constructs. The same would apply for assoc/playerS
vs. role/player.
> , and also enables Robert's idea.
... which has a doubtful value in TMQL IMO. The idea is nice for a
wrapper around TMQL like an ORM-alike framework.
Best regards,
Lars
--
Semagia
<http://www.semagia.com>
<http://www.topicmaps.de/mailinglist/> German Topic Maps mailing list
<http://tinytim.sourceforge.net/> Open Source Topic Maps engine
<http://mappa.semagia.com/> Mappa - Python Topic Maps engine
_______________________________________________
topicmapmail mailing list
[email protected]
http://www.infoloom.com/mailman/listinfo/topicmapmail