On Sat, 2 Aug 2003, Yoko Kamei Harada wrote:

> Date: Sat, 02 Aug 2003 11:23:23 +0900 (JST)
> From: Yoko Kamei Harada <[EMAIL PROTECTED]>
> Reply-To: Tomcat Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: Validation of the server.xml
>
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> Subject: Re: Validation of the server.xml
> Date: Fri, 1 Aug 2003 09:15:22 -0700 (PDT)
>
> > On Fri, 1 Aug 2003, Sabine Winkler wrote:
> > > may be, this isn't really important but why is there no DTD or scheme to
> > > validate the server.xml ? in combination with the defined DTD for validating
> > > the mbeans descriptor file this should be a 'nice' feature. so if You are
> > > interested in developing / using such a scheme I would start to define one.
> > > Interest ???
> > >
> >
> > A complete DTD (and I'm pretty sure even a schema) for server.xml, which
> > would support the current level of functionality, is not technically
> > feasible.
>
> How about RELAX NG (http://relaxng.org/) ?
> RELAX NG is a schema language for XML.
> RELAX NG has a "include" feature, so RELAX NG allows merging
> plural schemas.
>

How would you specify the rules (even in English) for <Valve>?

The set of attributes recognized by every Valve implementation class in
the world is different.  And the same thing applies to all the other
elements -- the valid set of attributes depends on the implementation
class pointed at with the "className" attribute, or the default one that
is built in as described in the docs.  Validation rules would have to
include the ability to introspect the corresponding Java classes in order
to identify the legal attribute names.

> And the schema compiler for RELAX NG such as JAXB and
> Relaxer(http://www.relaxer.org/) maps the schema to Java classes.
> If tomcat provides some rules for schemas to include, it is easy to get
> Java objects from XML documents.
> The server.xml will be a plugable and valid document.
>

I'm going to remain a skeptic until someone shows me it is possible, by
actually doing it for at least a couple of server.xml elements :-).  Don't
get me wrong -- I agree that such a thing would be useful -- I just don't
think it can be done.

> ---
> HARADA, Yoko

Craig


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

Reply via email to