Thanks Costin, The use of JTidy code could help, I found the license
---------------------------------------------------------------------------- --------------- /* HTML parser and pretty printer Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. Contributing Author(s): Dave Raggett <[EMAIL PROTECTED]> Andy Quick <[EMAIL PROTECTED]> (translation to Java) The contributing author(s) would like to thank all those who helped with testing, bug fixes, and patience. This wouldn't have been possible without all of you. COPYRIGHT NOTICE: This software and documentation is provided "as is," and the copyright holders and contributing author(s) make no representations or warranties, express or implied, including but not limited to, warranties of merchantability or fitness for any particular purpose or that the use of the software or documentation will not infringe any third party patents, copyrights, trademarks or other rights. The copyright holders and contributing author(s) will not be liable for any direct, indirect, special or consequential damages arising out of any use of the software or documentation, even if advised of the possibility of such damage. Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, documentation and executables, for any purpose, without fee, subject to the following restrictions: 1. The origin of this source code must not be misrepresented. 2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source. 3. This Copyright notice may not be removed or altered from any source or altered source distribution. The copyright holders and contributing author(s) specifically permit, without fee, and encourage the use of this source code as a component for supporting the Hypertext Markup Language in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated. */ ---------------------------------------------------------------------------- -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 1:50 PM To: Tomcat Developers List Subject: Re: Proposal for a JSP to JSP Document (XML view of JSP) Converter On Thu, 13 Dec 2001, Ragy Eleish wrote: > Write a tool based on the Jasper code line to convert normal JSPs to the XML > view of JSPs (aka JSP Document). This tools should have a two modes; the > first one to convert any JSP to XML view of JSP. The second mode to convert > HTML+JSP to XHTML+JSP document, where it fixes all HTML tags incorrectness > and convert them to XHTML transient format (like an enhanced Tidy). For the second part, there is also 'jtidy' ( not sure about the licence ). For the first part - the only problem is preserving the line numbers for error reporting ! This problem is common to other systems ( cocoon, probably most translators ). One possible solution is to add a special attribute to the generated XML tags ( in a separate namespace ). Or just make sure you generate with exactly the same line structure. I assume you'll use CDATA for the content ( or translate to >... ) to make sure it is a valid xml ( if the source is not HTML/XHTML ). > Open Questions: > ----------------------- > - Should this tool be a forked from Jasper code line or should Jasper be > modified to add customizations to it? I would vote for the first option. Eventually make it an ant-like bean, so it can be automatized/integrated into ant later. > - Is that an acceptable proposal? If yes, who should I contact to commit to > code to CVS (since I don't have a commit status)? I'm +1 on such a tool, I think it would be quite useful. You'll need to send this as a patch first. Costin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>