nexists

Processes its template content if the given model node does not exist in the model.

The tag uses the specified query expression to navigate the model and retrieve the nodes matching the query expression. If no nodes match the query expression and the attr attribute is omitted then the tag's template content is processed.

If the attr attribute is specified, then none of the retrieved nodes can have an attribute by that name in order for the template content to be processed.


Tag Summary
 
required <nexists node="value" />
 
full tag <nexists node="value" attr="value" />

Required Attributes
 
node A query expression that resolves to some number of nodes in the model

Optional Attributes
 
attr The name of an attribute that must be absent in every node matching the query expression in order for the template content to be processed.

Example
 
<nexists
        node="unique/component id='%part(id)%'" ><copyNode node="part" name="component" parent="unique" /></nexists>

This nexists tag is being used to create a list of component nodes that have unique id attribute values. A candidate node element named "part" has an id attribute whose value is used to search for component elements with that same id value. If no such component elements are found then the contents of the nexists tag are processed.

In this case, the contents contain a copyNode tag that copies the node associated with name "part" to a new node named "component" under the node associated with the name "unique". If this process were repeated for each part node, then a collection of unique components can be built.


© Copyright IBM Corporation 2000, 2006. All Rights Reserved.