Some programming languages use the semicolon ";" as the params delimiter. So what about
(:zap if <PmWikiConditionExpr> ; <trueAction> ; <falseAction>:) e.g. (:zap if ( expr auth read & date ...20070309 ) ; field1=value1 field2=value2 ... ; field1=value1 field2=value2 ...:) Jiri The Editor napsal(a): > On 3/8/07, Hladůvka Jiří <[EMAIL PROTECTED]> wrote: > >> Ben Stallings napsal(a): >> >>> Dan wrote, >>> >>> (:zap condition="condition" fields="field1,field2" true="value1,value2" >>> false="value3,value4":) >>> ... >>> >> Looks good - I vote for this. >> >> Jiri >> > > Can't really do that without creating a new markup which I would > rather avoid. According to my markup definition, it has to look like > (:zap if*="text...":). > > Here's the best in my view so far: > > (:zap if="condition ? field1=value1, field2=value2 : field1=value3 , > field2=value4":) > > With these related options: > > (:zap if="condition ? field1=value1` field2=value2 : field1=value3 ` > field2=value4":) > > Replaces , with ` which is almost never used to help avoid accidental > bugs from user input. > > (:zap if="condition ? field1=value1, field2=value2 (false) > field1=value3 , field2=value4":) > > Another indicator beside : for what to do when the condition fails... > Other options include > ! or :: or || (!), etc... Again, the more common the delimiter, the > more likely your conditional will be compromised... > > Hmmm, I was thinking I might be able to escape any delimiters used, > and then return them just before the actions are triggered but don't > see how that would work. Perhaps I could convert them then for if's > and validates, and then reconvert them back later. That could make > this a bit more ironclad, meaning I could focus more on syntax... :) > > So should we go with option 1? > > Cheers, > Dan > _______________________________________________ > pmwiki-users mailing list > [email protected] > http://www.pmichaud.com/mailman/listinfo/pmwiki-users > > __________ Informace od NOD32 2104 (20070308) __________ > > Tato zprava byla proverena antivirovym systemem NOD32. > http://www.nod32.cz > > > > -- OBUTEX s.r.o Ing.Jiří Hladůvka Zlatovská 22 911 01 Trenčín tel.: +421 (0)32 6587000 mailto:[EMAIL PROTECTED] http://www.obutex.com _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
