Thanks. That works. Brennan Spies Sr. Programmer Analyst Shared Application Services
-----Original Message----- From: Curt Arnold [mailto:[EMAIL PROTECTED] Sent: Thursday, January 11, 2007 2:27 PM To: Log4J Users List Subject: Re: [log4j] Question about XMLLayout On Jan 11, 2007, at 1:30 PM, Spies, Brennan wrote: > Hi all, > > > > I want to use a file appender that uses XMLLayout to output an XML > file, then > process this XML file with XSLT (Ant's xslt task) during an Ant build > process. The problem is, I am getting an error regarding the "log4j" > namespace coming from the output of XMLLayout-namely that it is not > declared > in the document. > > > > Is there a way to get XMLLayout to declare this namespace-or simply to > suppress its use of the namespace prefix? > > Brennan Spies > > Sr. Programmer Analyst > log4j doesn't actually produce an XML document since an XML document can only have one element. log4j produces an XML parsed entity (in this case a sequence of elements) that can be referenced in an XML document and it is assumed that the containing document would declare the namespace prefix. To process the output of log4j by XSLT, you would need to create a small XML document that includes the log file and then process the XML document using XSLT. Your XML document would look like: <!DOCTYPE mydocument [ <!ENTITY logfile SYSTEM 'logger.xml'> ]> <mydocument xmlns:log4j='http://jakarta.apache.org/log4j/'> &logfile; </mydocument> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]