Skip to main content
summaryrefslogtreecommitdiffstats
blob: a8bdf2a8fc13d203558907dc8fd4b61cc39c1348 (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
81
82
83
84
85
86
87
88
89
90
<!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">
<link rel="STYLESHEET" href="../../../book.css" charset="ISO-8859-1" type="text/css"/>
<TITLE>&lt;c:if&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:if&gt;</P></TH>
			<TH align="right"><A href="overview.html">Standard JET2 Control Tags</A></TH>
		</TR>
	</TBODY>
</TABLE>
<HR>
<P><B>if</B></P>
<P><P>               Process the tag contents if a test condition is satisfied.<P><P>If the 'test' XPath expression is does not result in a boolean value, then it is converted to a boolean value according the the XPath 1.0 specification. In particular, if the XPath expression results in a set of objects, then 'test' is considered to be true if and only if the set is not empty.<P><P>If the 'test' XPath expression is not well formed, then an error results.<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:if test=&quot;<I>value</I>&quot;&gt;<br>
			&nbsp;&nbsp;&nbsp;&nbsp;<I>content to process if tag condition is
			satisfied</I><BR>
			&lt;/c:if&gt;
			</SPAN></TD>
		</TR>
		<TR>
			<TD width="10%">full tag</TD>
			<TD><SPAN style="font-family: monospace">
			&lt;c:if test=&quot;<I>value</I>&quot; var=&quot;<I>value</I>&quot;&gt;<br>
			&nbsp;&nbsp;&nbsp;&nbsp;<I>content to process if tag condition is
			satisfied</I><BR>
			&lt;/c:if&gt;
			</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Required Attributes</TH></TR>
		<TR>
			<TD width="10%">test</TD>
			<TD><BR>                  An expression expression, that, if true, causes the tag contents to be evaluated.<BR>               </TD>
		</TR>
	</TBODY>
</TABLE>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Optional Attributes</TH></TR>
		<TR>
		<TR>
			<TD width="10%">var</TD>
			<TD><BR>                  The name of a variable that will refer to the value of the 'test' expression prior to it being converted to a boolean value'. The variable has the scope of the tag contents.<BR>               </TD>
		</TR>
	</TBODY>
</TABLE>
<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 if example -->
            &lt;%-- process contents if 'name' attribute is equal to JET --%&gt;<BR>
			&lt;c:if test=&quot;$var/@name = 'JET'&quot;&gt;<br>
			&nbsp;&nbsp;&nbsp;&nbsp;<I>content to process if tag condition is
			satisfied</I><BR>
			&lt;/c:if&gt;
<!-- End if example -->
</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<P></P></BODY>
</HTML>

Back to the top