The log4net configuration is set by using reflection, the xml configuration file is read and each element is matched up to a property or method on a .net object. By adding a new type you are extending the configuration syntax.
There are a few xml elements and attributes that are specifically checked for. I have attached an xml schema that I think shows these elements, but is actually invalid because it contains an <any/> element at the same element as other named elements. The only xml schema that I can actually see correctly expresses the log4net configuration is: <?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="log4net"> <xs:complexType> <xs:sequence> <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Now this is not a very useful schema as it just says that the <log4net> element can contain any child elements. Nicko > -----Original Message----- > From: Ron Grabowski [mailto:[EMAIL PROTECTED] > Sent: 13 March 2006 22:19 > To: Log4NET User > Subject: RE: Xml schema for Log4Net configuration > > I'm not an XML Schema expert...is it possible to have a > schema that explains such a dynamic file structure? > > <?xml version="1.0" encoding="utf-8" ?> > <log4net> > <appender name="MyAppender" type="Company.Project.MyAppender"> > <a value="b" /> > <b value="a" /> > <c> > <d> > <e>f</e> > </d> > </c> > </appender> > <root> > <level value="ALL" /> > <appender-ref ref="MyAppender" /> > </root> > </log4net> > > Where MyAppender could be replaced with any number of > different custom appenders requiring any number of possible > configuration structures. > > You may be interesting in helping out with this: > > http://marc.theaimsgroup.com/?l=apache-logging-general&m=11413 > 6269031601&w=2 > > --- "Macagno, Julian" <[EMAIL PROTECTED]> wrote: > > > Hi Meera, > > > > > > > > I am having the same issue. If you have any luck can you > please notify > > me. > > > > > > Thanks, > > > > Julian > > > > > > > > Julian Macagno > > > > > > > > ________________________________ > > > > From: Meera Rajaram [mailto:[EMAIL PROTECTED] > > Sent: Monday, March 13, 2006 1:13 PM > > To: log4net-user@logging.apache.org > > Subject: Xml schema for Log4Net configuration > > > > > > > > Hi, > > > > I need to get the XML schema for the Log4Net Configuration > settings. > > > > > > > > Thanks, > > > > Meera > > > > > > > > > > >
log4net.config.xsd
Description: log4net.config.xsd