Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse JET Guide
Previous Page Home Next Page

<c:visitor>

Standard JET2 Control Tags

visitor

*** PROTOTYPE *** Iterate over an object and all its contained objects, typically be doing a depth-first traversal. For each identified object, the tag evaluates the 'test' condition on its contained 'visit' tags. Only those tags whose test condition is true have their contents processed.

If the 'select' XPath expression returns more than one object, only the first is written. If the XPath expression selects no objects, then an error occurs, unless the 'default' attribute is specified. If the 'select' XPath expression is malformed, then an error occurs.


Tag Summary
required <c:visitor select="value" var="value">
    content to be repeated for each iteration
</c:visitor>
full tag <c:visitor select="value" var="value">
    content to be repeated for each iteration
</c:visitor>

Required Attributes
select
The XPath expression to evaluate.
var
The name of a variable that will contain the current object in the iteration.

Example
<%-- traverse a model starting at $root. $cur refers to current node --%> <c:visitor select="$root" var="cur">
<c:visit test="local-name($cur) = 'a'">
    content to process of test is true
</c:visit>
    ... other <c:visit> tags ...
</c:visitor>


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire