Home > Contents > Index > 
IF
Processes other tags or displays text based on a logical condition.
Syntax
<IF COND="LOGICAL_EXPRESSION"> <THEN> tags and/or text </THEN> <ELSE> tags and/or text </ELSE> </IF>Parameters
COND (required)- String comparison of two string values. The operators supported are "=" (values are equivalent) or "!=" (values are not equivalent)".
The following are conditions that Sites provides for use with the
IFtag; all these subconditions return eithertrueorfalse:
errnois actually an error.Description
The
IFtag processes other tags or displays text based on a logical condition. If the condition is true, the content of theTHENtag is processed. If the condition is false, the content of theELSEtag is processed. TheTHENtag is required as part of anIFtag. TheELSEtag is not required.Error Numbers
There are no possible
errnofor this tag.Example
The following example prints the message
Color is red. if the value ofVariables.colorisred.<IF COND="Variables.color=red"> <THEN> Color is red.<br/> </THEN> <ELSE> Color is not red.<br/> </ELSE> </IF>This example tests for the existence of the variable,
color. If a variable namedcolorhas been set prior to this test,The variable color exists.is displayed.<IF COND="IsVariable.color=true"> <THEN> The variable color exists.<br/> </THEN> </IF>
Home > Contents > Index > 
Oracle XML Tag Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.