On Nov 29, 2004, at 5:56 PM, Ceki G�lc� wrote:
At 12:22 AM 11/30/2004, you wrote:Are you suggesting we leave things as-is?
I think this will break most existing xml-based configurations (assuming that folks based their config on one in the 'examples' directory):
http://cvs.apache.org/viewcvs.cgi/logging-log4j/src/java/org/apache/ log4j/xml/examples/
At the very least I'd hope we could get Joran to report the error instead of silently swallowing it. Is that possible? (maybe with a message in the console if they get an ILL_FORMED that this could be due to the declaration?)
Yes, it's possible. Here is what you get with the latest code I just checked in:
java -classpath \;log4j-1.3alpha-3.jar SimpleLog file:///home/ceki/withdtd.xml
Reported error: "Parsing warning" at line 2 column -1 with exception org.xml.sax.SAXParseException: Relative URI "log4j.dtd"; can not be resolved without a base URI.
org.xml.sax.SAXParseException: Relative URI "log4j.dtd"; can not be resolved without a base URI.
It should be possible to provide the needed DTD (for parsers that demand it) by embedding a copy of log4j.dtd within the log4j.jar file, creating a class that implements org.xml.sax.EntityResolver and have its' resolveEntity method return an InputSource that contains a stream from the resource when the system ID is log4j.dtd. Should work with all JAXP compatible parsers.
Pretty simple, if you can't take it from there, I can do it in a day or two.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
