From 1cbbefe2c89da103d780b001c56e3d8aaeaa1c19 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Wed, 11 Feb 2009 13:42:21 -0500 Subject: - take a stab at documenting %ifeq() --- doc/format-specifiers.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'doc') diff --git a/doc/format-specifiers.txt b/doc/format-specifiers.txt index c20471a..7ee6cc7 100644 --- a/doc/format-specifiers.txt +++ b/doc/format-specifiers.txt @@ -400,3 +400,24 @@ Here's an example entry: And here's how an example expression evaluates for ''cn=group'': %link("%{member}","?","/","%{membername}","?") -> (uid=bob/jim,uid=pete/?) + +=== ifeq === + + ifeq(''ATTRIBUTE'',''EXPRESSION'',''MATCH-EXPRESSION'',''NONMATCH-EXPRESSION'') + +Evaluates ''EXPRESSION'', and if the entry's ''ATTRIBUTE'' attribute +matches the value provided by the expression, evaluates and returns +''MATCH-EXPRESSION'', otherwise ''NONMATCH-EXPRESSION'' will be +evaluated and returned. + +Here's an example entry: + + dn: cn=group + cn: group + membername: jim + member: uid=bob + member: uid=pete + +And here's how an example expression evaluates for ''cn=group'': + + %ifeq("member","jim","","%{membername}") -> (jim) -- cgit