Basic XDoclet Problem
Greg Haines <[email protected]> Wed, 29 Aug 2007 16:25:22 -0400
| Newsgroups | gmane.comp.java.xdoclet.user |
|---|---|
| Organization | Ned Davis Research, Inc. |
| Message-ID | <[email protected]> |
I am trying to use XDoclet to create a custom XML document that lists
out all the methods and parameters of a given class. I got it to work
once, but since then, I have been banging my head against the wall
trying to get even the most basic template to produce results. I'm sure
it is something silly that I am not doing correctly but I am at my wit's
end. Thanks in advance for your help!
Below is what I have been trying to get to work:
-PaletteCreator.xdt-
<?xml version="1.0" encoding="UTF-8"?>
<palette id="All Functions" style="outlook">
<XDtClass:forAllClasses>
<palette id="<XDtClass:className/>">
<XDtMethod:forAllMethods>
<function name="<XDtMethod:methodName/>"
class="<XDtClass:fullClassName/>"
rType="<XDtMethod:methodType/>">
<XDtParameter:forAllMethodParams>
<pType name="<XDtParameter:methodParamName/>"
type="<XDtParameter:methodParamType/>" />
</XDtParameter:forAllMethodParams>
</function>
</XDtMethod:forAllMethods>
</palette>
</XDtClass:forAllClasses>
</palette>
-build.xml-
<?xml version="1.0" encoding="UTF-8"?>
<project name="Palette" default="createPalette" basedir=".">
<path id="xdocpath">
<fileset dir="/path/to/xdoclet">
<include name="*.jar" />
</fileset>
</path>
<taskdef
name="templatedoclet"
classname="xdoclet.DocletTask"
classpathref="xdocpath"
/>
<target name="createPalette">
<templatedoclet destdir="${basedir}">
<fileset dir="${basedir}/src">
<include name="MyFunctions.java" />
</fileset>
<template
templateFile="PaletteCreator.xdt"
destinationfile="paletteDynamic.xml" />
</templatedoclet>
</target>
</project>
*Note: /path/to/xdoclet is the path to the extracted contents of
xdoclet-lib-1.2.3.zip and MyFunctions.java is a public class with only
static methods.
Here is what happens when I run ant:
> ant
Buildfile: build.xml
createPalette:
[templatedoclet] (XDocletMain.start 47 ) Running
<template/>
[templatedoclet] (TemplateSubTask.engineStarted 806 ) Generating
output 'paletteDynamic.xml' using template file
'file:/path/to/project/PaletteCreator.xdt'.
BUILD SUCCESSFUL
Total time: 1 second
The resulting paletteDynamic.xml:
<?xml version="1.0" encoding="UTF-8"?>
<palette id="All Functions" style="outlook">
</palette>
Which is obviously not the intended result. Any help would be appreciated!
-Greg Haines
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
greg.vcf
(text/x-vcard, 302 B)
begin:vcard fn:Greg Haines n:Haines;Greg org:Ned Davis Research, Inc.;Data Department adr:;;600 Bird Bay Drive West;Venice;FL;34285-8020;United States of America email;internet:[email protected] title:Java Programmer tel;work:941-412-2300 x-mozilla-html:FALSE url:http://www.ndr.com/ version:2.1 end:vcard