Hi All,
I am trying to write a template file that can parse the following tags:
/**
* tags removed to make it easier to read
*
* @tiles.definition
* name="/dynamic/tiles/viewOneCompany"
* extends="base"
*
* @tiles.put
* name="body"
* value="/dynamic/company/viewCompany.jsp"
*
* @tiles.definition
* name="/dynamic/tiles/viewManyCompanies"
* extends="base"
*
* @tiles.put
* name="body"
* value="/dynamic/company/listCompany.jsp"
*
*/
Essentially what I want to do is to have the tiles.put tag associated
(nested inside) a tile.definition tag.
I have written a template that has some code in it that contains the
following snippet:
<!-- loops around the tiles.definition tag -->
<XDtClass:forAllClassTags tagName="tiles.definition">
<definition name="<XDtClass:classTagValue
tagName="tiles.definition" paramName="name"/>">
<!-- nests the tiles.put tag -->
<XDtClass:forAllClassTags tagName="tiles.put">
<put name="<XDtClass:classTagValue tagName="tiles.put"
paramName="name"/>" value="<XDtClass:classTagValue tagName="tiles.put"
paramName="value"/>"/>
</XDtClass:forAllClassTags>
</definition>
</XDtClass:forAllClassTags>
<!-- my generated xml file from the above javadocs-->
<definition name="/dynamic/tiles/viewOneCompany" extends="base">
<put name="body"
value="/dynamic/company/viewCompany.jsp"/>
<put name="body"
value="/dynamic/company/listCompany.jsp"/>
</definition>
<definition name="/dynamic/tiles/viewManyCompanies"
extends="base">
<put name="body"
value="/dynamic/company/viewCompany.jsp"/>
<put name="body"
value="/dynamic/company/listCompany.jsp"/>
</definition>
Notice that the "/dynamic/tiles/viewOneCompany" and the
"/dynamic/tiles/viewManyCompanies" definitions have two elements in them
for body. That is not what I want. I want the code tp look like:
<definition name="/dynamic/tiles/viewOneCompany" extends="base">
<put name="body"
value="/dynamic/company/viewCompany.jsp"/>
</definition>
<definition name="/dynamic/tiles/viewManyCompanies"
extends="base">
<put name="body"
value="/dynamic/company/listCompany.jsp"/>
</definition>
Is it possible to do this? I was thinking of setting some kind of a
counter or something but I am not sure if this is possible.
Any help would be great. Thanks
Jordan
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user