Re: dsiabling recursing capabilities in template ?
Neil <[email protected]> Tue, 17 May 2005 11:44:03 +0100
| Newsgroups | gmane.comp.mozilla.devel.rdf |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
vaab wrote: > 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... I don't know how it works in the extended template syntax, but in the simple syntax you can write <rule parent="menu"> and the rule won't match the generated menuitems. -- Warning: May contain traces of nuts.