If you are interested in a slightly different solution, I have written some preliminary TagHandlers for the Zeus project, which IMO works a whole lot better than the JAXB RI (well for DTDs anyway)
I was frustrated with JAXB RI and its closed code generation, so I thought the XDoclet template engine would be a better bet. I use Zeus to generate the core classes, but I use my own TagHandlers & Templates for generated other files I want (like interfaces, support classes etc). I do a proof of concept for the actual Zeus XML handler classes, but never completed it. Of course with Zeus you get all the source code so you know what you have to generate with your template. I do this without a TemplateSubTask, simply by using the XDtTagDef tag at the top of my custom templates to get my custom tag handler registered e.g. <XDtTagDef:tagDef namespace="Binding" handler="com.versata.repository.tool.xdoclet.ZeusBindingTagsHandler"/> This took a bit of doing originally since my TagHandler isn't working with Javadoc at all, but with the fantastic support this list provides, it all came together pretty easily In this way I was able to change the inheritance, implementation, interface support etc to meet my needs. Let me know if there is any interest. Matthew > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Kuntz > Sent: Saturday, January 19, 2002 10:49 AM > To: [EMAIL PROTECTED] > Subject: [Xdoclet-user] Looking for Suggestions with JAXB problem > > > I have only been working with XDoclet for a few days and have run into a > problem that I am looking for "best solution" suggestions on. > > I am using the early-access Java Architecture for XML Binding (JAXB) to > handle all XML parsing and generation. JAXB has its own source generation > classes that accept a DTD and a JAXB specific binding schema and generate > "xml-aware" objects. > > So far I have created a custom dataobject.j template which allows > the Data > object to extend the JAXB generated Data object. I have also created > templates which generate the DTD and Binding Schema mentioned above. This > all works great thanks to XDoclet's extensibility. > > My problem is that I need to invoke the JAXB class that will generate the > source for the JAXB object and I want to do that for each class that I am > processing in my EjbDoclet task. I need to be able to dynamically set the > names of the input files (DTD/Binding Schema) and the ouptut file (JAXB > object). > > Do I create a new TemplateSubTask? Or maybe since my Data object > will always > need to extend the JAXB object, should I modify DataObjectSubTask > to include > additional parameters? Is it a really bad idea to invoke the JAXB source > generation during an XDoclet task? I know that I don't want to do my own > JAXB object generation. <g> > > Thanks in advance for any help. > > Tim Kuntz > > _________________________________________________________________ > Get your FREE download of MSN Explorer at > http://explorer.msn.com/intl.asp. > > > _______________________________________________ > Xdoclet-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user > _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
