cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: XPathXMLFileModule differences
Date Fri, 28 Aug 2009 02:41:18 GMT
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


Mime
View raw message