Use this: http://jakarta.apache.org/commons/jelly/libs/xml/tags.html#xml:doctype
On Fri, 30 Jul 2004 14:27:58 +1200, Jason Lea <[EMAIL PROTECTED]> wrote: > > I am having some trouble with having characters xml encoded in my jelly > script. > > I am trying to generate an XHTML web page, which I send as email. Here > is the jelly file::| > > <?xml version="1.0"?> > <j:jelly trim="false" xmlns:j="jelly:core"> > <![CDATA[ > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > ]]> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>foo</title> > </head> > <body> > ... > </body> > </html> > </j:jelly>| > > Which gives this output > > |<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > || <title>foo</title> > </head> > <body> > ... > </body> > </html> > > |I have tried using <j:set> with escape set to false. This sets a > variable, but I need the text to be output as a string, so writing out > the variable ends up escaping the < & > characters again. > > I get the output as a stream which I put into a string and attach to the > email message. I suppose I could cheat and have the doctype prepended > to the string and not included in the jelly script, but that would be > crummy. > > Any ideas? Am I doing something stupid? > > -- > Jason Lea > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://www.multitask.com.au/people/dion/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
