dsiabling recursing capabilities in template ?
vaab <[email protected]> Mon, 16 May 2005 16:03:03 +0200
| Newsgroups | gmane.comp.mozilla.devel.rdf |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Hi,
I want to disable recursion in templates to only show the first level of
recursion. But automatically, template builder goes through and build
the next levels of recursion.
Here is my code :
---
<menu id="testing" label="testing"
datasources="knowledge.rdf"
flags="dont-build-content dont-recurse"
ref="http://www.w3.org/2000/01/rdf-schema#Class">
<template>
<rule>
<conditions>
<content uri="?uri" />
<triple subject="?sub"
predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
object="?uri" />
</conditions>
<bindings>
<binding subject="?sub"
predicate="http://www.w3.org/2000/01/rdf-schema#label"
object="?label"/>
</bindings>
<action>
<menupopup>
<menuitem uri="?sub" label="?label"/>
</menupopup>
</action>
</rule>
</template>
</menu>
---
Each resource first find their type, then recurisvely build content for
the type of the type and so on...
adding :
<triple subject="?sub"
predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
object="http://www.w3.org/2000/01/rdf-schema#Class" />
managed to get rid of most of the recursion, but the resource
"http://www.w3.org/2000/01/rdf-schema#Class" is of "type" itself, which
triggers recursion infinitively.
This just makes firefox looping indifinitevely on research as
getElementsByAttribute or other earch in this tree. Very cumbersome in a
simple template menulist where I DON'T NEED/WANT to recurse !
anyone has an elegant solution ?
Valentin