> Hi XDoclet Experts, > > I'm trying to do my first steps with XDoclet and it works (almost) fine. > But I have a little tricky problem which i can't solve: > I generate a java-file (lt's call it target.java) from a file called > source.java using XDoclet. > My source.java is in the following package: > > package com.foo.bar.server.test; > [...] > > When I write this inside my foobar.xdt: > > [...] > <XDtPackage:packageName/> > [...] > > then XDoclet replaces this expression with > > [...] > com.foo.bar.server.test > [...] > > Thats correct, but I want it in another package. I want to replace > "server" with "client" inside this package name, so that XDoclet writes > this: > > [...] > com.foo.bar.client.test > [...] > > and thats exactly my problem. I cant manage this. I tried a lot of things, > but none worked. I tried to google for examples, but i don't found some. > The only thing that I found was "packageSubstitution" insinde the XDoclet > API. I tried to use > > <packageSubstitution packages="server" substituteWith="client"/> > > inside my ant-script in the target "foobar" (I'm using ant1.5 from the > shell, no IDE) but with no effect. > I found the class "PackageTagsHandler.PackageSubstitution" with the method > "setSubstituteWith(String substituteWith)" and inside the class > "PackageTagsHandler" i found the method "getPackageNameFor(String > packageName, boolean withSubstitution)" > I think that i can solve my problems using this methods obove, but i dont > know how i'm able to use them inside my foobar.xdt template. > > Can anybody help me and show me a code-snippet which is replacing my > "server" with "client"? > > Or can anybody explain me what i am doing wrong? > > Thanks in advance, > > Thomas Kraft
------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
