OK, it's implemented. Checkout from cvs.
Here is an example:
<taskdef name="templatedoclet" classname="xdoclet.DocletTask"
classpath="${xdoclet.jar.path};${log4j.jar.path};${ant.jar.path}"
/>
<templatedoclet
sourcepath="${java.dir}"
destdir="${output.dir}"
classpathref="project.class.path">
<fileset dir="${java.dir}">
<include name="test/ejb/*Bean.java" />
</fileset>
<template
templateFile="D:\XDocletProject\xdoclet\core\samples\script\report.j"
destinationFile="report-for-{0}.html"
ofType="javax.ejb.SessionBean,javax.ejb.EntityBean" extent="hierarchy"
havingClassTag="ejb:bean"/>
</templatedoclet>
templateFile and destinationFile are the minimum required parameters.
The {0} in destination mean a per class output is desired. The output
for test.ejb.AccountBean is test\ejb\report-for-AccountBean.html. ofType
mean only apply on classes of the specified types (comma-separated).
Extent is used for ofType, valid values are: concrete-type (good for
searching for a specific class, superclass for classes directly derived
from the type, and hierarchy for class extending or implementing a type
somewhere in its hierarchy (it's the default). ofType and extent should
be used with each other. havingClassTag means the class should have the
specified class tag in it, otherwise ignore it.
Note that currently you can't use ejb-specific tags, that's scheduled
for v1.1.
Ara.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:xdoclet-user-
> [EMAIL PROTECTED]] On Behalf Of J. Matthew Pryor
> Sent: Wednesday, October 10, 2001 3:32 PM
> To: Ara Abrahamian; [EMAIL PROTECTED]
> Subject: RE: [Xdoclet-user] example use of <template/> tag
>
> Sounds excellent, I'll happily beta test it
>
> jmp
>
> > -----Original Message-----
> > From: Ara Abrahamian [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, October 10, 2001 8:45 PM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: RE: [Xdoclet-user] example use of <template/> tag
> >
> >
> > Currently there's no support for per class templates, but you can
write
> > templates that operates on a set of classes (like ejb-jar_xml.j).
> > Hopefully I'll implement what you're looking for today :-)
> > So you'll be able to do something like this:
> >
> > <template destinationFile="{0}" templateFile="MyTemplate.j"/>
> >
> > And {0} will be substituted by class name. Probably I'll also add a
> > derivedFrom and havingClassTag params so you'll be able to specify
which
> > classes you want output for, not just all classes in the fileset.
OK?
> >
> > Ara.
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
[mailto:xdoclet-user-
> > > [EMAIL PROTECTED]] On Behalf Of J. Matthew Pryor
> > > Sent: Wednesday, October 10, 2001 10:07 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [Xdoclet-user] example use of <template/> tag
> > >
> > > I was wondering if anyone had an example use of the template tag ?
> > >
> > > I can get it to work, but it appears that is gets passed the root
of
> > the
> > > JavaDoc run, where I was expecting to be able to apply a template
to
> > each
> > > individual class/interface
> > >
> > > I realize I can do this by changing the fileset, but I was
wondering
> > if
> > > perhaps I was using the <temaplate/> tag incorrectly
> > >
> > > I have something like this :
> > > <ejbdoclet
> > > sourcepath="${java.dir}"
> > > destdir="${generated.java.dir}"
> > > classpathref="project.class.path"
> > > excludedtags="@version,@author"
> > > ejbspec="2.0">
> > >
> > > <fileset dir="${java.dir}">
> > > <include name="**/*Bean.java" />
> > > </fileset>
> > >
> > > <template destinationFile="MyFile.java"
> > > templateFile="MyTemplate.j"/>
> > >
> > > </ejbdoclet>
> > >
> > > Basically I just want to apply a customer template to a large
number
> > of
> > > Java
> > > files that already have the custom javadoc tags in them
> > >
> > > I realize also I could create a custom Doclet task of SubTasb, but
I
> > can
> > > see
> > > an easy way to hook additional subtasks into an existing doclet,
looks
> > > like
> > > I'd have to write my own top-level Ant Task (styled on something
like
> > > webdoclet)
> > >
> > > I am way off track ?
> > >
> > > Also is there any plan to support Ant Mappers to enable the
> > specification
> > > of
> > > output file names ?
> > >
> > > Thanks,
> > > Matthew
> > >
> > >
> > > _______________________________________________
> > > Xdoclet-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> >
> >
> > _________________________________________________________
> > 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
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel