[alicebot-archcomm] [discuss] sets and lists in AIML

Jon Baer alicebot-archcomm@list.alicebot.org
Sat, 16 Mar 2002 17:19:09 -0500


"Dr. Richard S. Wallace" wrote:

> > <add name="foo">x,y,z</add> (comma deliminated, but I like <li> idea
> better)
> > <remove name="foo">x,y</remove> (* removes all but it's sloppy)
>
> I know.  Ugly as it appears, we may have to use <li>...</li> (or something
> like it) as a delimeter in sets and lists.   At least, it will be familiar
> to folks who know HTML.
>

Not to mention it would be easier API wise to parse out and a comma may be
included so +1 for <li> as a marker for any lists as a list item.  Im still not
sure about placing <li> within <set> tags though, even if <add> doesn't make
sense.  I have not seen any XML language handle sets with the exception of
VoiceXML that handles arrays through attributes "namelist" which is comma
deliminated but formed through Javascript which could be kinda ugly.

> Stepping back for a moment, we overlooked one fundamental question.  What is
> the definition of "equals"?  To implement <remove> or <less> you need to
> define an equals() function of some kind.  One choice would be to say
> "equals" means "matches with AIML Pattern mathcing rules."  Another choice
> would be "equals" means "exactly equal to including case, punctuation,
> spaces etc."  Thoughts?  Strongly held convictions?

Tough question.  Case sensetivity is likely to break somewhere along the line.
<add name="name">Jon</add> and then having to match JON might seem a little
weird.

- Jon