DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=28882>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28882 ------- Additional Comments From [EMAIL PROTECTED] 2007-09-11 07:04 ------- I would much prefer Peter's addition of task-invisible namespaced attributes, because it is more powerful that if/unless on sequential, since allows conditional use of any XML tag, like his <arg> example. (note that I've used a custom conditional sequential for years myself, so I'm not biais against it!) That said, I wonder how the antlib-defined extra "action" attribs are defined and used, and how well that plays with XML NS rules. You can't write if:ac:foo="" for example. Ideally I would prefer the "action" attributes to be part of a limited expression language for conditions, and be part of the attribute value itself: <project name="x"> <property name="onWindows" value="true"/> <target name="abc"> <echo ant:if="isset(onWindows)">I am on windows</echo> <echo ant:unless="isset(onWindows)">I am *not* on windows</echo> </target> <macrodef name="mycommand"> <attribute name="level" default=""/> <attribute name="debug" default=""/> <attribute name="file"/> <sequential> <exec executable="mycommand"> <arg value="--debug" ant:if="istrue(@{debug})"/> <arg value="--level" ant:unless="isempty(@{level})"/> <arg value="@{level}" ant:unless="isempty(@{level})"/> <arg value="@{file}"/> </sequential> </macrodef> </project> Then antlibs can declare new action verbs and use the them with the NS prefix, a la XPath, like ant:if="ac:isfalse(${debug})". I realize this is much more difficult to achieve, so Peter's proposed syntax sounds fine too. I'm just throwing the idea out there. --DD -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]