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
Answertopia.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:set>

Standard JET2 Control Tags

set

Set an attribute on an object selected by an XPath expression. The value of the attribute is determined by the contents of the tag.

If the XPath expression results in more than one object being selected, then that attribute is created on only the first selected object.

If the XPath expression does not select an object, or if the XPath expression is malformed, then an error occurs.

The 'name' attribute need not refer to an attribute defined on the selected object. If the attribute does not exist, one is created dynamically. Such dynamically created attributes are not permanent - they are destroyed when the JET2Context object passed to the template is destroyed.

If the 'name' attribute refers to an existing attribute on the selected object, then the tag attempts to convert the string contents of this tag to the appropriate attribute data type. If this conversion fails, then an error occurs.


Tag Summary
required <c:set select="value" name="value">
    content to be written
</c:set>
full tag <c:set select="value" name="value">
    content to be written
</c:set>

Required Attributes
select
The XPath expression to evaluate.
name
The name of the attribute to set or create and set.

Example
<%-- create or update an attribute name-length on element $var --%> <c:set select="$var" name="name-length">
<c:get select="string-length(local-name($var))"/>
</c:set>


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