cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: xsl: disable-output-escaping
Date Fri, 29 Sep 2000 23:33:06 GMT
Andy Bosch <Andy_Bosch@csi.com> wrote:
>That is hard. Because I really need such a function.
>e.g.:
><root>
><content> This is the content of the tag <br> which is html</content>
></root>
>
>For an xml-parser this is not correct, because <br> is not closed 
>correctly.
>But for an html-editor it works fine.
>The problem is, I get the line from an html-editor, so I cannot ensure that
>every html-tag is also correct for an xml-parser.
>
>So what can I do?

Well HTML parsing can be a bit of a pig to do, but if you only have small 
sections of text it shouldn't be too hard to write code to XML-ize it and 
then parse it. There are free tools  like W3C Tidy but that's not perfect - 
in fact some HTML out there (not standards-compliant HTML, needless to say) 
is inherently ambiguous.

That's the best I can suggest at the moment. That or use something other 
than Cocoon (like just a servlet calling Xalan) for such pages. Xalan does 
disable-output-escaping fine if you let it do the outputting (which Cocoon 
doesn't because it doesn't fit with the separation of concerns and the 
framework, and because the additional features it offers are basically ugly 
hacks).





_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message