Hello Karol

Why don't you do something like this?

@prefix.request description="request description one" number="1" type="CL"
@prefix.request description="request description two" number="2" type="CL"

And if you define default values for methods it works (I don't recall if
it's supported at class level, ie, tag value level)

I't easier to iterate over the tags like you want to
<j:forEach var="request" items="$method.getTagsByName('prefix.request')">
      <request>
         <number>${request.number}</number>
         <description>${request.description}</description>
         <requestType>${request.type}</requestType>
      </request>
</j:forEach>


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

PrefixCreationDateTag get mapped to a tag @prefix.creation-date

I've seen some discussion about supporting different name scheme, but don't
know where it stands.





-----------------------------------
Diogo Bacelar Quintela
EF - Tecnologias de Informação, Lda.
Av. António Serpa, 26 - 4º Dto.
1050-027 Lisboa, Portugal
Tel: (+351) 217 827 800
Fax: (+351) 217 827 830
Email: [EMAIL PROTECTED]
PGP: 0xF51A5AB9 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: quinta-feira, 16 de Fevereiro de 2006 12:53
> To: [email protected]
> Subject: [xdoclet-user] custom plugin, multiple same tags, default values
> 
> 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
> 
> 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...
> 
> 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 {}
> 
> 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?
> 
> 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()}</cr
> eationdate>
> (...)
> 
> I just ask so I can havo no-warning builds:)
> 
> Thanks for helping in advance, you do great job!
> 
> Cheers,
> Karol
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to