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.
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3176)
at org.apache.crimson.parser.Parser2.resolveURI(Parser2.java:2758)
at org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2730)
at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1129)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.log4j.joran.util.XMLUtil.checkIfWellFormed(XMLUtil.java:105)
at org.apache.log4j.joran.util.XMLUtil.checkIfWellFormed(XMLUtil.java:80)
at org.apache.log4j.joran.JoranConfigurator.doConfigure(JoranConfigurator.java:86)
at SimpleLog.main(SimpleLog.java:18)
Reported error: "The 'log4j.dtd' is no longer used nor needed."
Reported error: "See http://logging.apache.org/log4j/docs/codes.html#log4j_dtd for more details."
Reported error: "Problem parsing XML document. See previously reported errors. Abandoning all furhter processing."
-- Ceki G�lc�
The complete log4j manual: http://qos.ch/eclm
Professional log4j support: http://qos.ch/log4jSupport
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
