[ 
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1303?page=comments#action_17419
 ] 

Andrew Stevens commented on XDT-1303:
-------------------------------------

For things that are global and not per-class, config params in the subtask are 
probably a better solution.

> @jdo.query
> ----------
>
>          Key: XDT-1303
>          URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1303
>      Project: XDoclet
>         Type: New Feature
>   Components: JDO Module
>     Versions: 1.2.3
>     Reporter: Marco Schulze
>     Assignee: xdoclet-devel (Use for new issues)
>     Priority: Minor
>      Fix For: 1.3

>
>
> I've added a new class tag: @jdo.query
> This tag currently is translated to <jdo>/<package>/<class>/<query>, but 
> according to the DTD, it can be additionally declared globally: <jdo>/<query>
> Because I cannot put the @jdo.query tag at a higher level than the class, I 
> want to add an optional parameter "global=true|false". This param will 
> default to false, because a query will be used mostly within the context of a 
> class.
> Now my problem: I have to iterate everything twice, because first I have to 
> scan all *.java files and create the <jdo>/<query> XML elements and in the 
> second run, the <package> elements (incl. content) are added. Unfortunately, 
> I cannot iterate twice: In the second run, only the last class is processed. 
> This happens in the jdo-file-per-package-mode.
> I've added the following lines in jdo_xml.xdt directly under <jdo>:
>  <XDtConfig:ifConfigParamEquals paramName="jdospec" value="2.0">
>   <XDtJdo:forAllPackages>
>    <XDtJdo:forAllClassesInPackage>
>     <XDtClass:forAllClassTags tagName="jdo.query" superclasses="false">
>      <XDtClass:ifClassTagValueEquals tagName="jdo.query" paramName="global" 
> value="true" superclasses="false">
>       <query name="<XDtClass:classTagValue tagName="jdo.query" 
> paramName="name"/>"
>        <XDtClass:ifHasClassTag tagName="jdo.query" paramName="language" 
> superclasses="false">
>              language="<XDtClass:classTagValue tagName="jdo.query" 
> paramName="language"/>"
>        </XDtClass:ifHasClassTag>
>       >
>        <![CDATA[<XDtClass:classTagValue tagName="jdo.query" 
> paramName="query"/>]]>
>       </query>
>      </XDtClass:ifClassTagValueEquals>
>     </XDtClass:forAllClassTags>
>    </XDtJdo:forAllClassesInPackage>
>   </XDtJdo:forAllPackages>
>  </XDtConfig:ifConfigParamEquals>
> Is this code wrong or are there bugs in the XDoclet iterators?
> Marco :-)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to