[alicebot-archcomm] <set> tag, and clearing predicates
Kim Sullivan
alicebot-archcomm@list.alicebot.org
Tue, 10 Dec 2002 20:26:59 +0100
> So you are right .. I should've checked the actual spec instead of what I
> had ;-) In which case, why isn't there a shortcut for <set/> when there is
> for just about everything else that often takes <star/> as a parameter
> (<srai>, <person>, <person2>, <gender>). I think <set/> ==
> <set><star/></set> and having <clear/> or something, as <clear/> is less
> ambiguous, and <set/> would then be just like the other shortcut elements.
Probably because some people like to have the option to really set an empty
string as a value :-) Just my preference though.
> > What does bother me is the fact that you can't test for an empty value,
> > and a single wildcard usually matches an empty string (going against the
> > "one or more words" definition).
>
> I don't see why you can't do this. Doesn't <li value=""> achieve this?
> Though, personally, I'd prefer having <li exists="true|false"> instead.
Because you're not allowed to write value="" :-)
This is one really cryptic part of the spec I'm not too happy about. This
somehow happened when it was decided to remove "startswith" and "endswith"
and "contains" from the condition and (as an alternative) allow wildcards in
the value part (to be precise - AIML patterns)
Unfortunately, a pattern must (says the spec) be at least a word or a
wildcard - you can't have an empty pattern. This brings a little
inconsistency in the whole system - ever wondered why the default
<pattern>*</pattern> category gets activated on an empty input, when it
matches one or more words?
Kim