From: Ken Coar Date: Thu, 28 Aug 1997 15:24:07 +0000 (+0000) Subject: The long-awaited doc update for the conditional SSI enhancements X-Git-Tag: APACHE_1_3b1~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=961a459bf765570b8c842cdb99b6f74b3c522b5b;p=apache The long-awaited doc update for the conditional SSI enhancements (including some HTML cleanup), and some additional items for the new-for-1.3 page. PR: 41 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@79100 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_include.html b/docs/manual/mod/mod_include.html index d8b2f04ada..939d8c33be 100644 --- a/docs/manual/mod/mod_include.html +++ b/docs/manual/mod/mod_include.html @@ -267,62 +267,71 @@ otherwise: <!--#endif --> -

Flow Control Elements

+

Flow Control Elements

These are available in Apache 1.2 and above. The basic flow control elements are:
-    <!--#if expr="test_condition" -->
-    <!--#elif expr="test_condition" -->
+    <!--#if expr="test_condition" -->
+    <!--#elif expr="test_condition" -->
     <!--#else -->
     <!--#endif -->
 
-

The if element works like an +

The if element works like an if statement in a programming language. The test condition is evaluated and if the result is true, then the text until - the next elif, else. - or endif element is included in the + the next elif, else. + or endif element is included in the output stream. -

The elif or else +

The elif or else statements are be used the put text into the output stream if the original test_condition was false. These elements are optional. -

The endif element ends the - if element and is required. +

The endif element ends the + if element and is required. -

test_condition is one of the following: +

test_condition is one of the following:

-
string
true if string is not empty - -
string1 = string2
- string1 != string2 - -
Compare string1 with string 2. If string2 has the form /string/ - than it is compared as a regular expression. +
string
true if string is not empty + +
string1 = string2 +
+ string1 != string2 +
+ string1 < string2 +
+ string1 <= string2 +
+ string1 > string2 +
+ string1 >= string2 + +
Compare string1 with string 2. If string2 has the form /string/ + then it is compared as a regular expression. Regular expressions have the same syntax as those found in the - Unix egrep command. - -
( test_condition ) -
true if test_condition is true -
! test_condition -
true if test_condition is false -
test_condition1 && test_condition2 -
true if both test_condition1 and - test_condition2 are true -
test_condition1 || test_condition2 -
true if either test_condition1 or - test_condition2 is true + Unix egrep command. + +
( test_condition ) +
true if test_condition is true +
! test_condition +
true if test_condition is false +
test_condition1 && test_condition2 +
true if both test_condition1 and + test_condition2 are true +
test_condition1 || test_condition2 +
true if either test_condition1 or + test_condition2 is true
-

"=" and "!=" bind more tightly than "&&" and - "||". - "!" binds most tightly. Thus, the following are equivalent: +

"=" and "!=" bind more tightly than "&&" and + "||". + "!" binds most tightly. Thus, the following are equivalent:

     <!--#if expr="$a = test1 && $b = test2" -->
@@ -330,15 +339,15 @@ elements are:
 

Anything that's not recognized as a variable or an operator is - treated as a string. Strings can also be quoted: 'string'. + treated as a string. Strings can also be quoted: 'string'. Unquoted strings can't contain whitespace (blanks and tabs) because it is used to separate tokens such as variables. If multiple strings are found in a row, they are concatenated using blanks. So,

-     string1    string2  results in string1 string2
-    'string1    string2' results in string1    string2
+     string1    string2  results in string1 string2
+    'string1    string2' results in string1    string2
 

@@ -374,7 +383,7 @@ is set, then set the Last-modified date of the returned file to be the last modified time of the file. If it is not set, then no last-modified date is sent. Setting this bit allows clients and proxies to cache the result of the request. -

Note: you would not want to use this, for example, when you +

Note: you would not want to use this, for example, when you #include a CGI that produces different output on each hit (or potentially depends on the hit).