The Configuration code is SAX based, very simple and builds a very
light "DOM-like" structure.

Changing it to support mixed content should be simple enough:
 - Commenting out the validation that forbids mixed context;
 - Placing children element nodes and text nodes in the same
   list, in order to be able to follow the sequence.

All the SAX voodo is already there.

(Can you know how much I master SAX??? NOT! And still, I was able
to understand this thing.)

The data structure in:
  - DefaultConfiguration.java
  - AbstractConfiguration.java  (just utility methods)

SAX related code in:
  - DefaultConfigurationBuilder.java
  - SAXConfigurationHandler.java            (no name spaces)
  - NamespacedSAXConfigurationHandler.java  (with name spaces)

It is a good starting point even if you do not want to use a
data structure.


Have fun,
Paulo Gaspar



> -----Original Message-----
> From: Scott Sanders [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 08, 2002 5:40 AM
> To: Avalon Developers List
> Subject: RE: Configuration that supports mixed content
>
>
> The biggest thing  that I need right now is something that supports
> mixed content that is SAX based.
>
> Scott
>
> > -----Original Message-----
> > From: Jeff Turner [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, January 07, 2002 8:37 PM
> > To: Avalon Developers List
> > Subject: Re: Configuration that supports mixed content
> >
> >
> > On Mon, Jan 07, 2002 at 07:36:43PM -0800, Scott Sanders wrote:
> > > Hello all,
> > >
> > > I am a committer over at the commons, and I currently have
> > a need to
> > > do xml-based configuration based on mixed content xml.  Currently
> > > Digester cannot handle mixed content without significant interface
> > > change, and Paolo Gaspar (sp?) pointed me to the avalon cvs repo,
> > > specifically org.apache.avalon.framework.configuration.
> >
> > People are very touchy about the configuration API ;) Mixed
> > content has been ruled out before, as it would complicate
> > what is currently a nice, simple API. The theory is that if
> > you want mixed content, use JDOM/dom4j/something else.
> >
> > > Is there something better than this that might be
> > experimental (Peter,
> > > this is directed at you with Myrmidon)?
> > >
> > > Is anyone interested/willing to let me pull it out into commons and
> > > make it a fully standalone component?
> >
> > If you have an idea of what you want the Configuration
> > interface to look like, I could help fork the Avalon code to
> > meet your needs, since I'm quite familiar with it.
> >
> >
> > --Jeff
> >
> >
> >
> > > Thanks
> > > Scott Sanders
> > >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:avalon-dev-> [EMAIL PROTECTED]>
> > For
> > additional commands,
> > e-mail: <mailto:[EMAIL PROTECTED]>
> >
> >
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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

Reply via email to