--- [EMAIL PROTECTED] wrote:

> Hi,
> 
> After managing to get xdoclet2 running I must say I
> like it very
> much:) Anyway, I have following problems that I
> cannot solve myself:
> 
> Let say I have following tags:
> 
>       * @prefix.request.description request description
> one
>       * @prefix.request.number 1
>       * @prefix.request.requestType CL
>       * 
>       * @prefix.request.description request description
> two
>       * @prefix.request.number 2
>       * @prefix.request.requestType CL

It would be better to make tags with parameters:
@prefix.request number="" type="" description=""

This way all the data will be available in the same
object 

> I want to map it to following XML:
> 
>      <request>
>         <number>1</number>
>         <description>request description
> one</description>
>         <requestType>CL</requestType>
>       </request>
>      <request>
>         <number>2</number>
>         <description>request description
> two</description>
>         <requestType>CL</requestType>
>       </request>
> 
> I tried different approaches, like using <j:forEach>
> tag, but it
> doesn't work...

Of course - how are you going to decide which tags
belong together?

> Second problem is defining default values. If I try
> to do this in
> following way:
> 
> /**
> * @qtags.location method
> * @qtags.default unit
> * @qtags.allowed-value comparison
> * @qtags.allowed-value unit
> * @qtags.allowed-value functional
> * @qtags.allowed-value flt
> */
> public interface PrefixTypeTag extends DocletTag {}

Define gettermethods for tag your parameters 
and place defaul/alowed tags there

> it says I cannot use default at class level. But I
> use tags without
> parameters, only raw values like "@prefix.type
> unit", is there any
> way to define default in such a case?

Yep. It's intendet to be used at getter. QTags plugin
generates nice tag implementation wrapper around raw
qtags from qdox

> Last thing, which is not very important, but bothers
> me: for
> "@prefix.creationDate" tag I defined
> PrefixCreationDateTag
> interface, but I get following warning:

> [xdoclet] Unknown tag: @prefix.creationDate in
> (...).java (line 31)
> 
> The same situation happens with i.e.
> "@prefix.request.description",
> so I guess mixed capitals or more than one prefix
> are problematic.
> It works though, I get access to those tags like
> this:
>
> <j:forEach var="method"
> items="${class.getMethods()}">
>
<creationdate>${method.getTagByName('prefix.creationDate').getValue()}</creationdate>
> (...)
> 
> I just ask so I can havo no-warning builds:)

You have forgot toregister your tag library  - thus
the tags are unknown and you get only raw qdox tag
objects

regards,

----[ Konstantin Pribluda http://www.pribluda.de ]----------------
Still using XDoclet 1.x?  XDoclet 2 is released and of production quality.
check it out: http://xdoclet.codehaus.org

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to