  <!-- =================================================================== -->
  <!-- Interactive scratchpad builds                                       -->
  <!-- =================================================================== -->
  <target name="scratchpad" depends="init, create-xmlcatalog"
          description="Interactive Scratchpad Build">
    <echo message="--------------------------------------------------------------"/>
    <echo message=" "/>    
    <echo message="          ${fullname} ${version} SCRATCHPAD "/>
    <echo message=" "/>    
    <echo message="--------------------------------------------------------------"/>  
    <echo message="Building with ${ant.version}"/>  
    <echo message="using build file ${ant.file}"/>  
    <echo message="--------------------------------------------------------------"/>   
    <echo message=" "/>        
    <echo message=" These are SCRATCHPAD BUILDS. They are not guaranteed to work."/>
    <echo message=" You have been warned. "/>
    <echo message=" "/>
    <echo message=" transform-v11 ... from document-v10 to document-v11 DTD"/>
    <echo message=" validate-v11 .... XML validation according to v1.1 DTD"/>
    <echo message=" --------------"/>
    <echo message=" --------------"/>
    <echo message=" --------------"/>
    <echo message=" --------------"/>
    <echo message=" "/>

    <property name="input.selection" value=""/>
    <user-input name="input.selection">Please select a target </user-input>

    <ant antfile="src/scratchpad/targets/${input.selection}.xml"/>

    <echo message=""/>
    <echo message="Deleting temporary Ant xmlcatalog ..."/>
    <delete file="${schema.build.dir}/catalog-ant.xcat"/>

  </target>

<!-- =================================================================== -->
<!-- create-xmlcatalog target                                            -->
<!-- * Ant needs a special format of catalog.                            -->
<!-- * We do not want the document-v10 DTDs to be generally available    -->
<!--                                                                     -->
<!-- So we transform the catalog.xcat and add specific entries for v10   -->
<!-- and delete it when we have finished.                                -->
<!--                                                                     -->
<!-- This is a workaround solution until Ant gets proper support for     -->
<!-- catalog entity resolver.                                            -->
<!-- =================================================================== -->
<target name="create-xmlcatalog">

  <property name="schema.build.dir" value="${build.dir}/src/resources/schema"/>
  <property name="schema.dir" value="src/resources/schema"/>

  <echo message="Creating the special Ant xmlcatalog ..."/>
  <mkdir dir="${schema.build.dir}"/>

  <xslt style="${resource.dir}/library/xslt/xmlcatalog-ant.xsl"
    in="${schema.dir}/catalog.xcat"
    out="${schema.build.dir}/catalog-ant.xcat"
  />

</target>
