You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Tim Williams <wi...@gmail.com> on 2009/08/28 03:09:08 UTC
XPathXMLFileModule differences
Is the new XPathXMLFileModule not a drop-in replacement for the
XMLFileModule? I'm wondering if we may have been depending on some
[?undocumented?] lazy-loading behavior of the old one or something.
In the xconf file I have:
<component-instance
class="org.apache.cocoon.components.modules.input.XPathXMLFileModule"
logger="core.modules.mapper.link" name="linkmap">
</component-instance>
Leading to complaints of the absence of a src attribute. Our "<file
src" aren't defined in the xconf file, but rather in the xmap
themselves, e.g.
<input-module name="linkmap">
<file src="{src}" reloadable="true" />
</input-module>
It seems that the old version doesn't assume the file element exists
in the configure method:
Configuration[] files = config.getChildren("file");
for (int i = 0; i < files.length; i++) {
but the new one does...
Configuration fileConfig = config.getChild("file");
this.src = fileConfig.getAttribute("src");
I admit that I've been away from forrest for some time so perhaps
there's something I'm missing here? Any pointers appreciated...
Thanks,
--tim
Re: XPathXMLFileModule differences
Posted by David Crossley <cr...@apache.org>.
On Thu, Aug 27, 2009 Ralph Goers wrote:
>
> It has been quite a while since I last worked on Cocoon, but since I
> wrote XPathXMLFileModule I suppose I am best qualified to answer the
> question.
>
> XPathXMLFileModule is a replacement for XMLFileModule but it is not
> completely compatible - which is why it is a new module and not just
> an upgraded version of the old one. The differences were itemized in
> https://issues.apache.org/jira/browse/COCOON-1574 (see my comment on Dec
> 27, 2007)
Thanks for your answer Ralph, and for your work.
I am just Cc forrest-dev list.
-David
Re: XPathXMLFileModule differences
Posted by David Crossley <cr...@apache.org>.
On Thu, Aug 27, 2009 Ralph Goers wrote:
>
> It has been quite a while since I last worked on Cocoon, but since I
> wrote XPathXMLFileModule I suppose I am best qualified to answer the
> question.
>
> XPathXMLFileModule is a replacement for XMLFileModule but it is not
> completely compatible - which is why it is a new module and not just
> an upgraded version of the old one. The differences were itemized in
> https://issues.apache.org/jira/browse/COCOON-1574 (see my comment on Dec
> 27, 2007)
Thanks for your answer Ralph, and for your work.
I am just Cc forrest-dev list.
-David
Re: XPathXMLFileModule differences
Posted by Ralph Goers <ra...@dslextreme.com>.
It has been quite a while since I last worked on Cocoon, but since I
wrote XPathXMLFileModule I suppose I am best qualified to answer the
question.
XPathXMLFileModule is a replacement for XMLFileModule but it is not
completely compatible - which is why it is a new module and not just
an upgraded version of the old one. The differences were itemized in https://issues.apache.org/jira/browse/COCOON-1574
(see my comment on Dec 27, 2007)
On Aug 27, 2009, at 6:09 PM, Tim Williams wrote:
> Is the new XPathXMLFileModule not a drop-in replacement for the
> XMLFileModule? I'm wondering if we may have been depending on some
> [?undocumented?] lazy-loading behavior of the old one or something.
> In the xconf file I have:
>
> <component-instance
>
> class="org.apache.cocoon.components.modules.input.XPathXMLFileModule"
> logger="core.modules.mapper.link" name="linkmap">
> </component-instance>
>
>
> Leading to complaints of the absence of a src attribute. Our "<file
> src" aren't defined in the xconf file, but rather in the xmap
> themselves, e.g.
>
> <input-module name="linkmap">
> <file src="{src}" reloadable="true" />
> </input-module>
>
> It seems that the old version doesn't assume the file element exists
> in the configure method:
>
> Configuration[] files = config.getChildren("file");
> for (int i = 0; i < files.length; i++) {
>
> but the new one does...
>
> Configuration fileConfig = config.getChild("file");
> this.src = fileConfig.getAttribute("src");
>
> I admit that I've been away from forrest for some time so perhaps
> there's something I'm missing here? Any pointers appreciated...
>
> Thanks,
> --tim