forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: Nice changes!
Date Mon, 30 Sep 2002 09:53:19 GMT
On Sun, Sep 29, 2002 at 09:37:39PM +0400, Konstantin Piroumian wrote:
> From: "Jeff Turner" <jefft@apache.org>
...
> > So if, in cocoon.xconf, it is declared with:
> >
> > <component-instance
> >     class="org.apache.cocoon.components.modules.input.XMLModule"
> >     logger="core.modules.xml" name="forrestconf">
> >   <config>context://forrestconf.xml</config>
> > </component-instance>
> >
> > Then the XML file's values are accessible through variables like
> > {forrestconf:/forrestconf/skin}.
> 
> Cool!
> I was thinking about XMLModule exactly this way. If it's ready then I can
> commit it to Cocoon on Monday. It can be useful not only for Forrest.

I've submitted this at:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13131

> > Also, it is possible to use the XML file as input to the
> > DefaultsMetaModule:
...
> > It's still a bit buggy though, because if the XML file doesn't exist I
> > get an exception.
> 
> What do you expect to do if the XML file doesn't exist? I think that having
> an exception in that case is the best handling. Of course if the xception
> has a meaningful message.

I think the problem is that DefaultsMetaModule assumes every variable
'key' can be represented as an XML element name:

<values>
  <skin>defaultSkin</skin>
  <base-url>http://localhost:8080/cocoon</base-url>
</values>

Here, the keys are 'skin' and 'base-url'. What happens if the key is an
XPath expression like '/forrestconf/skin'? Might be a good idea to
support an alternative format:

<values>
  <value key="/forrestconf/skin">forrest-site</value>
  <value key="/forrestconf/base-url">/forrest</value>
</values>

Hmm. I can code it up if you think it's a good solution.

> > Anyway, does this sound like the right road to be following?
> 
> Definitely.

Good stuff

--Jeff

> Konstantin
> 
> >
> >
> > --Jeff
> >
> > > Regards,
> > >   Konstantin
> > >
> > > _________________________________________
> > > Konstantin Piroumian
> > > ICQ#: 2297575
> > > * More ways to contact me <http://wwp.icq.com/2297575>
> > > i See more about me <http://web.icq.com/whitepages/about_me?Uin=2297575>
> > > _________________________________________
> > >
> > >
> >
> 

Mime
View raw message