cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <>
Subject Re: HTML formatting by cocoon parser
Date Thu, 23 Nov 2000 20:12:23 GMT
"Amit Kaushik" <> wrote:
>Hi everybody,
>I have a problem with cocoon parser.In my DTD file i have an entity "p" of 
>type #PCDATA.In my XML file i can put this line in to this tag.....
><p>My name is &lt;b&gt; Amit Kaushik &lt;/b&gt;</p>
>when cocoon parse it it gives me this string.
>My name is <b> Amit Kaushik </b>
>while i want a output in an HTML format like after parsed by cocoon it 
>display "Amit Kaushik" in bold letter without displaying <b> and </b> tag.

That's not a parser problem - that's just how CDATA works in XML.

If you were using Xalan alone you could just use disable-output-escaping, 
but Cocoon doesn't support this. But wouldn't it be simplest to just alter 
your DTD?

Note that it is often a security risk to allow users to enter any tags they 
want, believe it or not, so it's best to restrict the tags to a small 
predefined set - so you can just put that set of tags in your DTD.

Get more from the Web.  FREE MSN Explorer download :

View raw message