ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 7879] - the "style" task is very useful, but a little too simple
Date Sun, 14 Apr 2002 20:05:11 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7879>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7879

the "style" task is very useful, but a little too simple





------- Additional Comments From gxzuo@yahoo.com  2002-04-14 20:05 -------
The "in" and "out" attributes are for single file only.  The 
"extension" attribute is actually close to what I wanted, but
I thought it was for specifying input extension when I made
the first comment.

My situation is something like this: I'm using one XML file as
spec for a domain class AND its related DAO class, e.g.

   Trade.xml -> Trade.java + TradeDAO.java

And I have lots of domain classes.  Using the external task
"styler", I can say:

   <styler>
      <fileset dir="xml">
         <include name="*.xml"/>
      </fileset>
      <transform file="domain.xsl"/>
      <output dir="domain">
         <mapper type="glob" from="*.xml" to="*.java"/>
      </output>
   </styler>

   <styler>
      <fileset dir="xml">
         <include name="*.xml"/>
      </fileset>
      <transform file="dao.xsl"/>
      <output dir="dao">
         <mapper type="glob" from="*.xml" to="*DAO.java"/>
      </output>
   </styler>

I got "styler" to work, but unfortunately it doesn't check
for up-to-date files which makes it useless: I don't want 100
files to be generated each time I type "build".

The second point regarding multiple transforms could also be
explained by how "styler" does it.  In the above XML code,
you can have multiple "<transform"> nodes.  I don't need
this feature now.

Seems to me "styler" does more than commonly useful and as
a result, it's more complicated than necessary. Even the syntax
looks too wordy.

I'd rather see "style" enhanced especially since it's a built-in
task.  I believe the two features I described are natural features
for a "style" task.  You can even use the current syntax:

   <style in="*.xml" out="*.java" style="domain.xsl|yyy.xsl"/>
   <style in="*.xml" out="*DAO.java" style="dao.xsl|xxx.xsl"/>

Gary

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message