>>>In addition to the src in each opt/{component} directory, >>>this directory could contain a cocoon.xconf and sitemap.xmap >>>fragment. >>> >> >>The problem here is that you don't know where the fragments have to be >>inserted in the main config or sitemap file. How about inserting XUpdate >>fragments and let Lexus edit the files? AFAIK there should be no >>licensing problems in including Lexus in the Cocoon dist. >> >> > Could you expand a little bit on this?
An example is worth thousand words. :) My XML:DB pseudo-protocol requires a modification of "source-handler" section of cocoon.xconf. The stock config is empty: <source-handler> </source-handler> It should become, at a minimum, something like: <source-handler> <protocol name="xmldb" class="org.apache.cocoon.components.source.XMLDBSourceFactory"> <driver type="dbxml" class="org.dbxml.client.xmldb.DatabaseImpl" /> <driver type="test" class="non.existant.class" /> </protocol> </source-handler> Now the problem is that I can't just write the last information in a file and "append" it to the configuration: there must be some logic to instruct the build process to insert the "protocol Node" (speaking in DOM terms) to the "source-handler Node". XUpdate does exactly that: the XUpdate block to perform this operation would be: <xupdate:append select="/cocoon/source-handler"> <protocol name="xmldb" class="org.apache.cocoon.components.source.XMLDBSourceFactory"> <driver type="dbxml" class="org.dbxml.client.xmldb.DatabaseImpl" /> <driver type="test" class="non.existant.class" /> </protocol> </xupdate:append> . after this a plain java ant task using org.infozone.lexus.XUpdateQueryImpl would allow cocoon.xconf to be changed gently and appropriately. XUpdate, besides, is used in the XML:DB API to update the DB contents: actually the Lexus implementation is used, and I don't see any licensing problems (the license is basically BSD) to include this tool in Cocoon. As an alternative, we could see if we can work out something similar with "st": it should be a pretty easy problem of DOM manipulation. Either way, something has to be done :) Ciao, -- Gianugo Rabellino --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]