|
From: Martin K. <Mar...@St...> - 2005-03-29 16:11:30
|
>A file-based setup approach is fine, I guess, probably with a file loaded > from the class path (same package as the HtmlUtils class itself). I'm > looking forward to reviewing the new implementation - let's see what you > came up with there :-) I use the http://www.w3.org/TR/html4/sgml/entities.html definitions. I have joined all three section within a single resource (file). To read the file I use the StreamTokenizer, but no additional library (it is a DTD resource). Sadly this doesn't come for free. I don't found a way to use a JDK library to parse DTD documents. If I missed a opportunity to use a 3rd party library supported by the current spring-framework, please give me a call. Another idea is to convert the whole document to xml (or any other format) to be able to use a more powerfull API to setup the character entity references. Beside this I think I have identified two issues about the HtmlUtils.htmlUnescape method / implementation, which both seam to be a bit inconsitent. I have created a test-case to ensure the exact behaviour of the refactored / restructurized version like the current implementation. I attached this test-case within this mail. The two identified issues can be found at the very end of the file and both are marked using '//TODO'. Please review the test-case, in the case I forgot to protect (test) a special behaviour of the current version. Cheers, Martin (Kersten) |