Skip to main content
summaryrefslogtreecommitdiffstats
blob: d4e306da1f8481427c15cfb567e87f186ac45928 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
<TITLE>&lt;c:set&gt; - Standard JET2 Control Tags</TITLE>
</HEAD>
<BODY>
<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
	<TBODY>
		<TR>
			<TH align="left">
			<P>&lt;c:set&gt;</P></TH>
			<TH align="right"><A href="overview.html">Standard JET2 Control Tags</A></TH>
		</TR>
	</TBODY>
</TABLE>
<HR>
<P><B>set</B></P>
<P><P>               Set an attribute on an object selected by an XPath expression. The value of the attribute is determined by the contents of the tag.<P><P>If the XPath expression results in more than one object being selected, then that attribute is created on only the first selected object. <P><P>If the XPath expression does not select an object, or if the XPath expression is malformed, then an error occurs.<P><P>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.<P><P>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.<P>            </P>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Tag Summary</TH></TR>
		<TR>
			<TD width="10%">required</TD>
			<TD><SPAN style="font-family: monospace">
			&lt;c:set select=&quot;<I>value</I>&quot; name=&quot;<I>value</I>&quot;&gt;<br>
			&nbsp;&nbsp;&nbsp;&nbsp;<I>content to be written</I><BR>
			&lt;/c:set&gt;
			</SPAN></TD>
		</TR>
		<TR>
			<TD width="10%">full tag</TD>
			<TD><SPAN style="font-family: monospace">
			&lt;c:set select=&quot;<I>value</I>&quot; name=&quot;<I>value</I>&quot;&gt;<br>
			&nbsp;&nbsp;&nbsp;&nbsp;<I>content to be written</I><BR>
			&lt;/c:set&gt;
			</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<exists node="tag/attribute use='required'">
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Required Attributes</TH></TR>
		<TR>
			<TD width="10%">select</TD>
			<TD><BR>                  The XPath expression to evaluate.<BR>               </TD>
		</TR>
		<TR>
			<TD width="10%">name</TD>
			<TD><BR>                  The name of the attribute to set or create and set.<BR>               </TD>
		</TR>
	</TBODY>
</TABLE>
</exists>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Example</TH></TR>
		<TR>
			<TD width="10%"></TD>
			<TD><SPAN style="font-family: monospace">
<!-- Begin set example -->

			&lt;c:set select=&quot;<I>value</I>&quot; name=&quot;<I>value</I>&quot;&gt;<br>
			&nbsp;&nbsp;&nbsp;&nbsp;<I>content to be written</I><BR>
			&lt;/c:set&gt;
<!-- End set example -->
</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<P></P></BODY>
</HTML>

Back to the top