From: Adrian S. <ad...@ya...> - 2009-09-14 01:05:46
|
I don't think JTidy can do that, but it sounds like you're looking for the wrong solution for your problem. The right solution would be to configure your XML parser to use a local copy of the DTD automatically. For example, The Flying Saucer Project ( https://xhtmlrenderer.dev.java.net/ ) does that. Also see http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic Adrian ________________________________ From: Grant (Guan Quan) Liu <gfo...@gm...> To: jti...@li... Sent: Saturday, September 12, 2009 7:32:22 AM Subject: [Jtidy-user] How to customize location of DTD? After using JTidy to parse my HTML file, I got a header like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> However, I need to change "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" to "xhtml1-transitional.dtd" so that I don't get 503 error. Is there anywhere in the API that allow me to make this change automatically? Thanks, Grant |