Using <star/> in links.

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown Using <star/> in links.

by Square Bear-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I currently have two categories as below:

<category>
<pattern>SHOWJOEY</pattern>
<template>
<srai>XDISPPICTURE joey XSEP Hey, it's Joey from Friends.</srai>
</template>
</category>

<category>
<pattern>XDISPPICTURE * XSEP *</pattern>
<template>
<star/>
<table class="table">
<tr align="center" class="tabtitle"><td>
<img
src="http://www.square-bear.co.uk/mitsuku/gallery/<star/>.jpg"></img></td>
<td valign="top"><font size="2" color="lime"><star
index="2"/></font></td></tr>
</table>
</template>
</category>

Unfortunately I get this error when compiling the aiml as I assume it
doesn't like the <star/> in my link:

a.. Your changes were not saved because the following error occured while
parsing the AIML:
XML not well-formed - attribute value cannot contain '<':
'http://www.square-bear.co.uk/mitsuku/gallery/<star/>.jpg"></' following
attribute: src

If I substitute the word "joey" for the <star/>, the category compiles and
works fine. Can anyone think of a way around this as I was hoping to avoid
having an individual category for each picture I want to show.

Regards
- Steve Worswick (Square Bear)
http://www.mitsuku.com

_______________________________________________
This is the pandorabots-general mailing list
To Post, reply to pandorabots-general@...
Unsubscribe and change preferences at http://list.pandorabots.com/mailman/listinfo/pandorabots-general
Learn netiquette at http://www.dtcc.edu/cs/rfc1855.html
Learn to read at http://www.literacy.org/

Re: Using <star/> in links.

by drwallace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Steve, I came up with one idea that might work for you.  Try
putting <template>...</template> inside the custom HTML.

On this demo, if you make the input "logo" it will create a dynamic link to
http://alicebot.org/images/logo.jpg

http://pandorabots.com/pandora/talk?botid=e4c315d14e36a987

The robot's AIML doesn't do much except echo the input with
<category>
<pattern>*</pattern>
<template><star/></template>
</category>

Panodorabots pre-processes the <template>...</template> inside the
custom HTML, but apparently does not enforce the XML rules as strictly
as the AIML editor does.

Here is the custom HTML file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<SCRIPT>
<!--
function sf(){document.f.input.focus();}
// -->
</SCRIPT>
</HEAD>
<BODY lang=en-US bgColor=#9999AA onload=sf()>
<FORM name=f action="" method=post>
!CUSTID!
<P><font face="arial"><b>You say:</b></font> <INPUT size=80 name=input> </P>
</FORM>
<br/>
<b><em>
<template>Human: <input/></template>
</em></b>
<br/>
<template><b>Robot: <em><response/></em></b></template>

<a href="http://alicebot.org/images/<template><response/></template>jpg">image</a>

<br/>
_______________________________________________
This is the pandorabots-general mailing list
To Post, reply to pandorabots-general@...
Unsubscribe and change preferences at http://list.pandorabots.com/mailman/listinfo/pandorabots-general
Learn netiquette at http://www.dtcc.edu/cs/rfc1855.html
Learn to read at http://www.literacy.org/

Re: Using <star/> in links.

by Square Bear-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for looking Dr Wallace.
You idea looks good. I'll have a play with it.
Regards
- Steve


----- Original Message -----
From: "Dr. Rich Wallace" <drwallace@...>
To: <pandorabots-general@...>; "Square Bear"
<squarebear@...>
Sent: Saturday, August 01, 2009 7:01 AM
Subject: Re: [pandorabots-general] Using <star/> in links.


> Hi Steve, I came up with one idea that might work for you.  Try
> putting <template>...</template> inside the custom HTML.
>
> On this demo, if you make the input "logo" it will create a dynamic link
to

> http://alicebot.org/images/logo.jpg
>
> http://pandorabots.com/pandora/talk?botid=e4c315d14e36a987
>
> The robot's AIML doesn't do much except echo the input with
> <category>
> <pattern>*</pattern>
> <template><star/></template>
> </category>
>
> Panodorabots pre-processes the <template>...</template> inside the
> custom HTML, but apparently does not enforce the XML rules as strictly
> as the AIML editor does.
>
> Here is the custom HTML file:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <SCRIPT>
> <!--
> function sf(){document.f.input.focus();}
> // -->
> </SCRIPT>
> </HEAD>
> <BODY lang=en-US bgColor=#9999AA onload=sf()>
> <FORM name=f action="" method=post>
> !CUSTID!
> <P><font face="arial"><b>You say:</b></font> <INPUT size=80 name=input>
</P>
> </FORM>
> <br/>
> <b><em>
> <template>Human: <input/></template>
> </em></b>
> <br/>
> <template><b>Robot: <em><response/></em></b></template>
>
> <a
href="http://alicebot.org/images/<template><response/></template>jpg">image<
/a>
>
> <br/>
>


----------------------------------------------------------------------------
----



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.39/2275 - Release Date: 08/01/09
09:38:00

_______________________________________________
This is the pandorabots-general mailing list
To Post, reply to pandorabots-general@...
Unsubscribe and change preferences at http://list.pandorabots.com/mailman/listinfo/pandorabots-general
Learn netiquette at http://www.dtcc.edu/cs/rfc1855.html
Learn to read at http://www.literacy.org/