You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by OOMS DIRK <Ex...@siemens.be> on 2005/03/15 12:16:01 UTC
log4j namespace question
Hello,
I have a question on the example xml config files in the log4j book, e.g. on
page 75 (of my version)
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender ...
</log4j:configuration>
My basic knowledge of xml namespaces tells me that 'appender' (and all other
tags inside this config) is outside the log4j namespace (else the top tag
should have contained a default namespace like:
xmlns="http://jakarta.apache.org/log4j/"). Is there a reason for this or is
my knowledge of xml namespaces not even basic?
[I was hitting this problem when i was writing an xml schema that was
checking whether a configuration was conforming to a subset of the log4j
tags.]
dirk
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: log4j namespace question
Posted by Curt Arnold <ca...@apache.org>.
Based on previous discussions on the topic, it wasn't intentional but
unfortunately that is how it is. In log4j 1.3, we have introduced an
new namespace "http://logging.apache.org" that contains all the
configuration elements and the intention to provide appropriate schemas
to assist in configuration authoring. At the present, I have added a
unit test that will check a collection of configuration documents
against a schema and provided a very, very rudimentary starting schema
that was going to evolve into a proper definition of log4j (and
log4cxx, et al) configuration. However, that has been stalled at a
very primitive state for quite some time.
If you were going to attempt to schema validate the current
configuration files, you would need to define a schema for
http://jakarta.apache.org/log4j containing configuration and import a
no-namespace schema for all the other elements.
On Mar 15, 2005, at 5:16 AM, OOMS DIRK wrote:
> Hello,
>
> I have a question on the example xml config files in the log4j book,
> e.g. on
> page 75 (of my version)
>
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
> <appender ...
>
> </log4j:configuration>
>
> My basic knowledge of xml namespaces tells me that 'appender' (and all
> other
> tags inside this config) is outside the log4j namespace (else the top
> tag
> should have contained a default namespace like:
> xmlns="http://jakarta.apache.org/log4j/"). Is there a reason for this
> or is
> my knowledge of xml namespaces not even basic?
>
> [I was hitting this problem when i was writing an xml schema that was
> checking whether a configuration was conforming to a subset of the
> log4j
> tags.]
>
> dirk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org