Author: jhm Date: Thu Mar 22 01:07:38 2007 New Revision: 521145 URL: http://svn.apache.org/viewvc?view=rev&rev=521145 Log: Add examples for <sort>. Got it from testcase and user-list (Matt).
Modified: ant/core/trunk/docs/manual/CoreTypes/resources.html Modified: ant/core/trunk/docs/manual/CoreTypes/resources.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTypes/resources.html?view=diff&rev=521145&r1=521144&r2=521145 ============================================================================== --- ant/core/trunk/docs/manual/CoreTypes/resources.html (original) +++ ant/core/trunk/docs/manual/CoreTypes/resources.html Thu Mar 22 01:07:38 2007 @@ -742,6 +742,30 @@ <h4><a name="rcmp.reverse">reverse</a></h4> <p>Reverse the natural sort order, or that of a single nested comparator.</p> + <h4>Examples</h4> + <pre> + <property name="eol" value="${line.separator}" /> + <pathconvert property="sorted" pathsep="${eol}"> + <sort> + <tokens> + <string value="foo bar etc baz" /> + <stringtokenizer /> + </tokens> + </sort> + </pathconvert></pre> + <p>The resource of type string "foo bar etc baz" is split into four tokens by + the stringtokenizer. These tokens are sorted and there <i>sorted</i> gets the value + of "bar baz etc foo".</p> + + <pre> + <sort> + <fileset dir="foo" /> + <reverse> + <date /> + </reverse> + </sort></pre> + <p>This takes all files from <i>foo</i> and sorts it by modification date in reverse order.</p> + </blockquote> <h4><a name="first">first</a></h4> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]