Carsten Ziegeler wrote: >>Sure thing. And now that I think about it, I'm wondering if we are >>trying once more to reinvent the wheel: since what we want to do is >>after all an XML transformation of two files, why don't we just write >>two stylesheets (say cocoon.xconf.xsl and sitemap.xmap.xsl) for each >>optional package? They should be trivial to write: if they are present >>the transformations will take place and modify the configs accordingly. >>This seems to me the cleanest and fastest way to achieve the result. >>What do you think? >> >> > So, the sitemap and cocoon.xconf are build-up from an base file which > is processed by several stylesheets. Hmm, this is an interesting idea! > One the one hand, I like it, because no java class has to be written > for it, no addition libs are needed etc.
Exactly. There are two minor caveats though about the ant task (in case you were planning to use it): the first is whitespace handling (but this can be due to my poor XSLT knowledge), since the added fragments are not properly whitespaced; the second is that it's not possible to specify the same file both as a source and as a result (the style task just does nothing in that case). Anyway, if we can't cope with it, writing a small Ant task that properly calls a serializer setting the appropriate options is trivial. I'm still convinced that this is the way to go: I wrote a simple stylesheet that changes cocoon.xconf for my needs and it was straightforward (I can send it if you want, but it's really a trivial one). > One the other hand, the configuration of the optinal components is > done by a stylesheet. This might look a little bit wired. Well... I don't think so: I think that stylesheets actually mean flexibility. However, given that basically what needs to be specified is an XPath to identify the section of the document and an XML fragment to add inside the node, it might be very simple to use a simpler syntax (like the xupdate one) and build a stylesheet out of it. Let me know if I can be of any help, -- Gianugo Rabellino --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]