beyaNet Consultancy wrote:
Hi,
I am having problems with an image string which prints the string to the screen instead of loading the image!


1. in my xsp page I first build up the image string as so:

<xsp:logic>
String num = "39";
StringBuffer sb = new StringBuffer()
.append("&lt;img src=\"")
.append(num)
.append(".jpg\" border=\"0\" width=\"200\" height=\"200\" /&gt;");


String artist1 = sb.toString(); </xsp:logic>

Simple - a Cocoon pipeline is a pipeline of sax events. Sax is an event based representation of pre-parsed xml, and so handles element events and character events separately. The code you showed results in inserting character events into the sax stream which will never be interpreted as element events. Look into xsp:element and xsp:attribute to accomplish what you are trying to do.


Geoff


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to