tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Todd <james.t...@eng.sun.com>
Subject Re: XML configuration revisited
Date Tue, 12 Oct 1999 22:22:16 GMT

i believe dtd and to validate or not are good for
some and bad for others. further, i believe it may
be attractive to allow for validation but not
necessarily require it.

from experience, while implementing the web.xml
support in tomcat i found the validation really
nice for when i was changing attributes by hand
and inevitably fat-fingered an entry or two. at
times folks just want to go straight from xml data
to the corresponding object and dtd validation
is in the way.

in short, having the option to validate my not
be a bad thing. tomcat has this flag in the
server.xml for this very reason.

hope this helps,

- james

Ben Laurie wrote:
> 
> Greg Stein wrote:
> >
> > Ben Laurie wrote:
> > >...
> > > ...I think that until you think about how to integrate subsystems you
> > > haven't addressed any problems that don't fall into the realm of the
> > > bleedin' obvious(tm). To take a really trivial Apache example, some
> > > modules have some configuration that can appear within <VirtualHost ...>
> > > sections, and some that can't. The XDTD should define this, rigorously.
> > > Somehow. Ideally in a way that everyone thinks is good and is
> > > standardised.
> >
> > "Bleedin' obvious(tm)" -- screw DTDs.
> >
> > The XML parser will check for well-formed-ness. Typos will bite people,
> > but I believe most of the use of XML will be through tools rather than
> > hand-coding (therefore, not falling prey to typos). If we want to
> > support the user-input model, then Apache can supply a post-process
> > check that does a depth-first traversal and compares element/attribute
> > names against lists provided by modules (which will catch the common
> > typo errors, but not structural ones). You could possibly validate a
> > subtree against a DTD (things like VirtualHost would need to be declared
> > "open" so it doesn't barf).
> >
> > Essentially, you are *creating* the problem by demanding the use of a
> > DTD. From experience, I can say that mod_dav is working just fine
> > without the use of a DTD. I see no reason to enforce the use of a DTD on
> > the Apache configuration process -- it causes more problems than it
> > solves.
> 
> I'm not demanding a DTD. I'm saying that it should be possible to
> validate the configuration file, without actually firing up Apache. This
> also means that tools should be able to say what is legal where, on the
> fly. A DTD is far too restrictive to do this, as I've said several
> times.
> 
> Cheers,
> 
> Ben.
> 
> --
> http://www.apache-ssl.org/ben.html
> 
> "My grandfather once told me that there are two kinds of people: those
> who work and those who take the credit. He told me to try to be in the
> first group; there was less competition there."
>      - Indira Gandhi
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

Mime
View raw message