Ferdinandus, Humphrey wrote:
> All,
>
>
>
> In JSP: Is there some sort of `isRelated' function to quickly determine
> if two nodes are related. I only want to show a node that is related to
> three other nodes of different types. The node numbers of the related
> nodes are known.
There is not one tag or one function for that.
It can relatively easily and efficiently be emulated by something like this:
<mm:listnodescontainer type="insrel">
<mm:composite operator="or">
<mm:composite operator="and">
<mm:constraint field="snumber" value="$node1" />
<mm:constraint field="dnumber" value="$node2" />
</mm:composite>
<mm:composite operator="and">
<mm:constraint field="snumber" value="$node2" />
<mm:constraint field="dnumber" value="$node1" />
</mm:composite>
</mm:composite>
<mm:size>
<mm:compare value="0" inverse="true">
${node1} and ${node2} are related!
</mm:compare>
</mm:size>
</mm:listnodescontainer>
and if you know the direction, about half of that...
You can do something with operator "IN" for three other nodes at the same
time.
I do think something like "mm:isrelated" is a valid wish. Simply add it
to the bugtracker if you like. It's quite easily granted (actually the
amount of time for creating the tag would have been comparable to the
amount it costed me to type up this mail...)
Probably it would be an idea to add a few attribute to the already
existing mm:hasrelations (like 'source', 'destination', 'other' and
'role') or so.
Michiel
--
Michiel Meeuwissen mihxil'
Peperbus 111 MediaPark H'sum [] ()
+31 (0)35 6772979 nl_NL eo_XX en_US
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers