> It is not about having "older" Java files that are not XDoclet
annotated.
> Nor is it about having EJB's for which we do not have the source.
> It is about generating/changing/removing a descriptor for one bean and
> leaving all the other xml tags intact. Let's say I start out with
this:
>
> <blahblah>
> <a>...</a>
> <b>...</b>
> <c>...</c>
> </blahblah>
>
> Suppose I want to create a new entry, I need to extract
>
> <a>...</a>
> <b>...</b>
> <c>...</c>
>
> and make it into a template, and merge it in at some merge point to
get
> this:
>
> <blahblah>
> <a>...</a>
> <b>...</b>
> <c>...</c>
> <d>...</d>
> </blahblah>
>
> Too complicated. I think XDoclet was not designed to generate parts
of
> target files, right?
I'm not sure I understand you correctly, anyway....
I've thought of it already when I was thinking about the GUI tool we're
working on it for v1.2. The solution I have in my mind is to define
template chunks like this:
<XDtChunk:chunk name="session">
<session id="<XDtEjb:id/>">
<XDtMerge:merge file="xdoclet/ejb/ejb-body.j">
</XDtMerge:merge>
</session>
</XDtChunk:chunk>
Then suppose you already generated an ejb-jar.xml once. You just want to
add another session to its <enterprise-bean/> element. Currently you
have to regenerate it, but using chunks, you'll pass the single file to
Xdoclet's subtask, Xdoclet will realize that a ejb-jar.xml file is
already there, so try to modify it, find where it should be generated to
using saxpath for example, get a jdom model in memory, then find the
template chunk and only run this chunk (it's easier than what imagine,
just pass this chunk element body to generate() method), chunk body is
processed and the result is generated, now add the result to the jdom
model and save the xml file. Hope you get the idea. It's not a priority
for us, yet. The good timing for this will be when we actually start to
develop the GUI tool I was talking about.
Let me know if we're on the same bandwidth :o)
Ara.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user