httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: XML configuration (was Re: environment patch)
Date Sat, 10 Jul 1999 11:11:27 GMT
Greg Stein wrote:
> > > Basically, a module can define whatever schema it would like within its
> > > "command" element.
> >
> > Which is cool, but what about the DTD?
> 
> DTD are for wussies.
> 
> Just kidding. Well, we strictly don't need a DTD to parse the stuff, you
> know. mod_alias just looks for the appropriate child elements in the
> element passed to it. If they are there, then everything's fine. If not,
> then an error is raised. A few utility functions, and this process
> becomes a snap:
> 
> const ap_xml_element *ap_get_child(const ap_xml_element *elem, const
> char *name);
> const char *ap_get_value(const ap_xml_element *elem, const char *name);
> 
> The first just returns a child element; the second could return the text
> from within a child element of "elem" (e.g. get the child via
> ap_get_child, then return the interior text).7
> 
> Personally, I'd prefer to have the speed of a non-conforming parser
> since the modules are implicitly going to be doing the validation. It
> also means that we don't have to teach XML DTD construction to module
> authors. They can simply monkey-see, monkey-do on the value fetching and
> skip DTD construction (yes, they could probably do this with a DTD, too,
> but that is parallel maintenance in my mind).

The problem is that DTDs are useful for the person who has to write the
XML. Of course, we can make DTDs optional.

Is it possible to nest DTDs? Or would we have to construct a "master"
DTD from lots of little ones?

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

Mime
View raw message