[alicebot-archcomm] [proposal] <get pattern=

Dr. Richard S. Wallace alicebot-archcomm@list.alicebot.org
Sat, 03 Nov 2001 09:01:33 -0800


> >
> > <!--Example 2-->
> > <category>
> >   <pattern>TELL ME SOME GOSSIP</pattern>
> >   <template>
> >     <random>
> >       <li>I heard that the rain in Spain falls mainly in the plain.</li>
> >       <li>Eliza lives.</li>
> >       <li>Elvis has left the building, but not the Internet.</li>
> >       <li>To live outside the law you must be honest.</li>
> >     </random>
> >   </template>
> > </category>
> >
> > <category>
> >   <pattern>TELL ME THAT GOSSIP AGAIN</pattern>
> >   <template>
> >     Last time I said <get pattern="TELL ME SOME
> > GOSSIP"><template/></get>.
> >   </template>
> > </category>
> >
>
> In this example you use <template/> inside the <get>...</get>, which
> presumably returns
> the evaluated template, so that the same random list item reappears.
>
> It might be more appropriate to invent a <response/> tag which stores the
> result of the

uh, template evaluation.  Retreiving an unevaluated <template> is ill
defined,
especially if it contains <get>, <condition> or <srai>.

Rich