Dirk Ooms wrote:

Hi,

i am a bit puzzled on how i should do an apriori validation of a log4j.xml in log4j1.3 (without applying it to a LoggerRepository).

The XML format used by log4j was not designed so that it can be effectively validated using standard XML validation technologies. It has been on my to-do list to attempt to design a modern XML configuration syntax with accompanying schema as at least a thought exercise.

The essential problem with the current design is that XML validation technologies rarely support the value space of one attribute based on the value of another. So while:

<appender class="org.apache.log4j.FileAppender">
<attribute name="file" value="foo.log"/>
</appender>

and

<FileAppender file="foo.log" xmlns="http://logging.apache.org"/>

have the same information content, but an XML schema can readily be written so that the file name is checked against a regular expression with the second form, but not the first.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to