title: Call a <macrodef> for each <pathelement> in a <path> in Ant
body: <p>I have a <code>path</code> as follows:</p>
  
  <pre><code>&lt;path refid="myjarlocation"/&gt;
  </code></pre>
  
  <p>Now I want to iterate over this path and for each value present in the path I want to call a macrodef with that value as one of the property to be used inside the marcodef.</p>
  
  <p>In case of target we can easily do it as follows:</p>
  
  <pre><code>&lt;foreach target="mytarget" param="jarloc"&gt;
      &lt;path refid="myjarlocation"/&gt;
  &lt;/foreach&gt;
  </code></pre>
  
  <p>I cannot use for each because I need to pass multiple parameters , so I am using macrodef. So, therefore the question how to iterate over a path and call a macrodef instead of  a target.</p>