Re: Nibutes from San Diego

"The Purple Streak, Hilarie Orman" <[email protected]> Sun, 29 Aug 2004 16:25:48 -0600
Newsgroups gmane.ietf.opes
Message-ID <[email protected]>
If a rule has the form

  IF P THEN DO A
(sometimes written P -> A as operational semantics)

then I'll call P the lefthand side or precondition or predicate.

Some examples are

  if (http:response:header:set-cookie ~= "RMID=\([^;]*]" ) then
     munge_cookie ( $1 )

  if (http:content-type ~= "^text") and 
       (  set_of (http:body:img:src ) ~= "[/]images/global[/]") then 
     rewrite_images ()

etc.

Hilarie


>  On Tue, 17 Aug 2004, Markus Hofmann wrote:

>  > Hilarie Orman expressed a preference for having P support regular 
>  > expressions in the lefthand side of rules,

>  Hilarie,

>	   Can you give an example or two of a regular expression in the 
>  lefthand side of rules? What is "lefthand side of rules"? Just trying 
>  to understand what the requirement is here...

>  Thanks,

>  Alex.