Hi Wim, > 1) if a tag is mentioned in the configfile (XMLMerger.xml) then there's > a test if it already appears in the targetfile. If so, it won't be > copied to the target file (again). This works fine for tags that only > appear once in the sourcefile (ejb-jar.xml), like <enterprise-beans>. > When i want to merge some <resource-refs>, which are related to my > entity beans, i have tell de XMLMerger (via the config file) that i want > to expand my <entity>-bean configuration. There is no > <resource-refs>-tag in my original source ejb-jar.xml. > Can i do this with the standard plugin ?
Aha. The only way I can think of (using the current verison) is to put the tags you need to have in the target file beforehand. That way they will be appended to, and will always be there. If this doesn't work for some reason, another (dirtier) solution is to add a "dummy" ejb jar dependency which only contains the target result you want to achieve. > One solution, of course, is to make sure that the required tags are > already (as placeholders) in the source file. But still, i will have tot > replace (override it via the config file) the whole <resource-refs> > section, so adding a single <resource-ref> to the already present ones > won't work, i guess. Hmm - not sure I really get this, Wim. Can you please expand on this? > 2) I want to override/merge a ''specific'' entity of session bean (or > whatever 'element' in my ejb-jar.xml. I guess that current > XMLMerger.java util will have to be extended to do something like: > source-element=config-element AND it's source attribute-'ID'=the > config's attribute-'ID'. No, you're right, I'm afraid - there is no way to do this at present. I think it would be best if we add something like a select using XPath in XSLT to specify an element which should be overridden and not merged. Thanks for your considerate and kind words, Wim. It sounds like the ejbmerge plugin could be extended to do exactly what you're looking for, though it won't do it "as is". I'm really busy today/tomorrow but, if you like, I could code you a solution on Saturday, if you send me 2 sample input files and a sample target result. Just send the files to the mail address below and I'll do it as soon as I can :-) Cheers, Colin __________________________________________________ Colin MacLeod [EMAIL PROTECTED] ivata.org - open source enterprise groupware --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
