<project name="test" default="new" basedir=".">
  <filterset id="testset.one">
    <filter token="aaaa" value="1111"/>
    <filter token="bbbb" value="2222"/>
  </filterset>
  
  <filterset id="testset.two" beginToken="%" endToken="^">
    <filter token="cccc" value="3333"/>
    <filter token="dddd" value="4444"/>
  </filterset>
  
  <target name="test1">
    <delete file="dest1.txt"/>
    <copy file="filterseta.txt" tofile="dest1.txt">
        <filterset refid="testset.one"/> 
    </copy>
  </target>

  <target name="test2">
    <delete file="dest2.txt"/>
    <copy file="filtersetb.txt" tofile="dest2.txt">
        <filterset refid="testset.two"/> 
    </copy>
  </target>

  <target name="test3">
    <delete file="dest3.txt"/>
    <copy file="filtersetc.txt" tofile="dest3.txt">
        <filterset refid="testset.one"/> 
        <filterset refid="testset.two"/> 
    </copy>
  </target>
  
  <target name="test-nested-filtersets">
    <filterset id="1">
      <filter token="token1" value="value1"/>
    </filterset>
    <filterset id="2">
      <filterset refid="testset.one"/>
    </filterset>
    <filterset id="3">
      <filterset id="4">
        <filter token="token4" value="value4"/>
      </filterset>
    </filterset>
    <filterset id="5">
      <filterset refid="1"/>
    </filterset>
  </target>

  <target name="cleanup">
    <delete file="dest1.txt" quiet="true" />
    <delete file="dest2.txt" quiet="true" />
    <delete file="dest3.txt" quiet="true" />
  </target>

</project>
