<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (c) 1995-2011 held by the author(s).  All rights reserved.
                          
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer
      in the documentation and/or other materials provided with the
      distribution.
    * Neither the names of the Naval Postgraduate School (NPS)
      Modeling Virtual Environments and Simulation (MOVES) Institute
      (http://www.nps.edu and http://www.MovesInstitute.org)
      nor the names of its contributors may be used to endorse or
      promote products derived from this software without specific
      prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-->

<!--
    Document   : build.xml
    Created on : 10 May 2008
    Author     : Don Brutzman
    Description: Ant build.xml file for X3D schemas and DTDs
-->
<project name="X3D specifications, schemas and DTDs" default="all" basedir=".">
    <description>Build X3D specifications:  schemas and DTDs</description>

    <!-- build tasks for X3D specifications appear in www.web3d.org/specifications, www.web3d.org/tools/X3D-Edit/javahelp, www.web3d.org/showcase2009 -->
    
    <!-- configuration properties ============================================================== -->
    <property name="access.properties.filename"  value="/.access/access.properties"/>
    <property file="${access.properties.filename}"/>

    <!-- properties common to all build files and archives ======================================== -->
    <property environment="env"/>
    
    <!-- ANT Contrib archive at http://sourceforge.net/project/showfiles.php?group_id=36177       -->
    <!-- must have ant-contrib.jar in ANT_HOME/lib (or else specify path)                         -->
    <!-- note that Netbeans default path is something like C:\Program Files\netbeans-5.5\ide7\ant -->
    <!-- and will have to be overridden by going to Tools > Options > Miscellaneous > Ant         -->
    <!-- and then pointing to C:\auv\AuvWorkbench\lib\apache-ant-1.7.0 (or somesuch directory)    -->
    <taskdef resource="net/sf/antcontrib/antlib.xml"/>

    <property name="saxon.dir" location="C:/java/saxonb9-1-0-6j"/>
    
    <xmlcatalog id="X3D.DTDs">
        <dtd publicId="ISO//Web3D//DTD X3D 3.0//EN"                                  location="x3d-3.0.dtd"/>
        <dtd publicId="ISO//Web3D//DTD X3D 3.1//EN"                                  location="x3d-3.1.dtd"/>
        <dtd publicId="ISO//Web3D//DTD X3D 3.2//EN"                                  location="x3d-3.2.dtd"/>
        <dtd publicId="ISO//Web3D//DTD X3D 3.3//EN"                                  location="x3d-3.3.dtd"/>
        <dtd publicId="http://www.web3d.org/specifications/x3d-3.0.dtd"              location="x3d-3.0.dtd"/>
        <dtd publicId="http://www.web3d.org/specifications/x3d-3.1.dtd"              location="x3d-3.1.dtd"/>
        <dtd publicId="http://www.web3d.org/specifications/x3d-3.2.dtd"              location="x3d-3.2.dtd"/>
        <dtd publicId="http://www.web3d.org/specifications/x3d-3.3.dtd"              location="x3d-3.3.dtd"/>
        <dtd publicId="file:///www.web3d.org/TaskGroups/x3d/translation/x3d-3.0.dtd" location="x3d-3.0.dtd"/>
        <dtd publicId="file:///www.web3d.org/TaskGroups/x3d/translation/x3d-3.1.dtd" location="x3d-3.1.dtd"/>
        <dtd publicId="file:///www.web3d.org/TaskGroups/x3d/translation/x3d-3.2.dtd" location="x3d-3.2.dtd"/>
        <dtd publicId="file:///www.web3d.org/TaskGroups/x3d/translation/x3d-3.3.dtd" location="x3d-3.3.dtd"/>
    </xmlcatalog>
   
    <!-- Ant macro definitions ===================================================================================== -->

    <!-- excerpted/adapted from "SAXON XSLT Processing with Ant" by James Fuller, http://ablog.apress.com/?p=753 -->
    <macrodef name="Saxon9.XML" description="Invoke XSLT transformation on passed inputXML to produce outputFile using passed stylesheet">
        <attribute name="inputXML"/>
        <attribute name="outputFile"/>
        <attribute name="stylesheet"/>
        <attribute name="parameters" default=""/>
        <attribute name="compiled"   default="false"/>
        <attribute name="verbose"    default="false"/>
        <sequential>
            <if>
                <equals arg1="@{verbose}" arg2="true" />
                <then>
                    <echo message="Saxon9.XML processing @{inputXML} and producing @{outputFile} using @{stylesheet}"/>
                </then>
            </if>
            <if>
                <equals arg1="@{compiled}" arg2="true" />
                <then>
                    <java classname="net.sf.saxon.Transform" classpath="${saxon.dir}/saxon9.jar;." fork="true" failonerror="false">
                        <!--<arg value="-t"/> timing information -->
                        <arg value="-w1"/> <!-- recover after writing a warning message -->
                        <arg value="-c"/>  <!-- compiled stylesheet -->
                        <arg value="-o"/>
                        <arg value="@{outputFile}"/>
                        <arg value="@{inputXML}"/>
                        <arg value="@{stylesheet}"/>
                        <arg value="@{parameters}"/>
                    </java>
                </then>
                <else>
                    <java classname="net.sf.saxon.Transform" classpath="${saxon.dir}/saxon9.jar;." fork="true" failonerror="false">
                        <!--<arg value="-t"/> timing information -->
                        <arg value="-w1"/> <!-- recover after writing a warning message -->
                        <arg value="-o"/>
                        <arg value="@{outputFile}"/>
                        <arg value="@{inputXML}"/>
                        <arg value="@{stylesheet}"/>
                        <arg value="@{parameters}"/>
                    </java>
                </else>
            </if>
        </sequential>
    </macrodef>

    <!-- target tasks ===================================================================== -->
    <target name="all" depends="build,upload"
        description="after generating DTD and schema documentation:  clean backups, validate, zip and upload the X3D DTD and schema specifications distribution">
    </target>

    <target name="build" depends="renameDoctypeDocumentation,cleanupSchemaDocumentation,clean,validate,zip,contents.TODO"
        description="after generating DTD and schema documentation:  clean backups, validate, and zip the X3D DTD and schema specifications distribution without upload">
    </target>
    
    <target name="contents.TODO" depends="clean.backups"
        description="generate table of contents">
        <echo message="TODO ant task to produce contents.html, contents.txt; ensure latest zips updated in results"/>
    </target>
    
    <target name="clean" depends="clean.backups,clean.zips" description="clean up" >
    </target>
    
    <target name="clean.backups" depends="" description="clean out unnecessary backup files (only)" >
        <echo message="clean/delete backup files"/>
        <delete verbose="true">
            <fileset dir="." includes="_new_pretty_print.html"/>
            <fileset dir="." includes="_new_result.wrl"/>
            <fileset dir="." includes="_new_result.x3d"/>
            <fileset dir="." includes="_new_result.x3dv"/>
            <fileset dir="." includes="*.bak"/>
            <fileset dir="." includes="hs_err_pid*.log"/>
            <fileset dir="." includes="manifest.mf"/>
            <fileset dir="." includes="*.$$$$$$"/> <!-- escape $ as $$ -->
            <fileset dir="." includes="Untitled-?.x3d"/>
            <fileset dir="." includes="**/*.bak"/>
            <fileset dir="." includes="**/*.$$$$$$"/>
        </delete>
    </target>
    
    <target name="clean.zips" depends="" description="clean autogenerated .zip files" >
        <echo message="clean/delete autogenerated .zip files"/>
        <delete verbose="true">
            <fileset dir="." includes="X3dSchemaDocumentation3.?.zip"/>
            <fileset dir="." includes="x3d-3.?.validation.zip"/>
        </delete>
    </target>
  
    <!-- SFTP ssh taskdef. this requires maverick-ant; the lib for this is included -->
    <!-- and is downloadable from http://www.sshtools.com/showMaverickAntTask.do    -->

    <!-- Maverick ssh/sftp ant task provided at http://www.sshtools.com/showMaverickAntTask.do -->
    <!-- don't need remotedir="HOME" since that is default landing location on savage.moves.nps.navy.mil sftp server -->
    <!-- recursing via includes="**/*.*" doesn't preserve directory structure on client side, likely due to sftp limitation  -->
    <!-- thus must use .zip, .tar.gz (.tgz) to preserve archive structure  -->
    <property name="path.maverick.jar" value="${env.ANT_HOME}/maverick1.2/lib/maverick-ant.jar"/>
    <taskdef  name="ssh" classname="com.sshtools.ant.Ssh" classpath="${path.maverick.jar}"/>
    <target name="sftp.askUsernamePassword.web3d"
        description="If needed, ask for username, password">
        <if>
            <not>
                <and>
                    <isset property="username.web3d"/>
                    <isset property="password.web3d"/>
                </and>
            </not>
            <then>
                <echo  message="username.web3d, password.web3d not obtained via file ${access.properties.filename}"/>
                <input message="username.web3d:"
                addproperty="username.web3d" />
                <input message="password.web3d:"
                addproperty="password.web3d" />
                <echo  message="username.web3d=${username.web3d}"/>
                <echo  message="password.web3d=################"/> 
                <!--<echo  message="password.web3d=${password.web3d}"/> debug -->
            </then>
            <else>
                <echo message="hostname.web3d, username.web3d, password.web3d obtained from file ${access.properties.filename}"/>
            </else>
        </if>
    </target>
    
    <target name="upload" depends="upload.products,upload.zips.documentation"
        description="full upload of all specification updates">
            <echo message="Online links available at http://www.web3d.org/x3d/content/examples/X3dResources.html#AuthoringSupport"/>

    </target>
    
    <target name="upload.products" depends="clean.backups,renameDoctypeDocumentation,validate,sftp.askUsernamePassword.web3d"
        description="sftp upload of updated X3D specification products">
        <echo  message="sftp upload to ${sftpServer.web3d}"/>
        <ssh host="${sftpServer.web3d}"
            username="${username.web3d}"
            password="${password.web3d}">
            <!-- first upload top-level files -->
            <sftp action="put" verbose="true"
                newer="true"
                skipfailedtransfers="true"
                remotedir="${sftpDirectory.web3d}/../../../specifications" >
                <!-- /var/www/html/specifications -->
                <fileset dir=".">
                    <include name="*.dtd"/>
                    <include name="*.txt"/>
                    <include name="*.xml"/>
                    <include name="*.xsd"/>
                    <include name="*.spp"/>
                    <include name="contents.html"/>
                    <!-- excluding these-->
                    <exclude name="index*.redirect.html"/>
                    <exclude name="**/_archive"/>
                    <exclude name="**/_archive/*"/>
                    <exclude name="**/CVS/*"/>
                    <exclude name="**/.svn/*"/>
                    <exclude name="**/_new*.*"/>
                    <exclude name="**/*.bak"/>
                    <exclude name="**/*.$$$$$$"/> <!-- escape $ as $$ -->
                </fileset>
            </sftp>
        </ssh>
        <echo  message="upload.products ssh-sftp task complete"/>
    </target>
    
    <target name="upload.zips.documentation" depends="sftp.askUsernamePassword.web3d"
        description="sftp upload of updated X3D specification .zips and documentation">
        <echo  message="sftp upload to ${sftpServer.web3d}"/>
        <ssh host="${sftpServer.web3d}"
            username="${username.web3d}"
            password="${password.web3d}">
            <!-- second upload .zip archives and documentation -->
            <sftp action="put" verbose="true"
                newer="true"
                skipfailedtransfers="true"
                remotedir="${sftpDirectory.web3d}/../../../specifications" >
                <!-- /var/www/html/specifications -->
                <fileset dir=".">
                    <include name="X3dDoctypeDocumentation3.*.html"/>
                    <include name="X3dSchemaDocumentation3.*.html"/>
                    <include name="X3dSchemaDocumentation3.3/*.*"/>
                    <include name="X3dSchemaDocumentation3.2/*.*"/>
                    <include name="X3dSchemaDocumentation3.1/*.*"/>
                    <include name="X3dSchemaDocumentation3.0/*.*"/>
                    <include name="X3dSchemaDocumentation3.3.zip"/>
                    <include name="X3dSchemaDocumentation3.2.zip"/>
                    <include name="X3dSchemaDocumentation3.1.zip"/>
                    <include name="X3dSchemaDocumentation3.0.zip"/>
                    <include name="x3d-3.*.validation.zip"/>
                    <!-- excluding these-->
                    <exclude name="index*.redirect.html"/>
                    <exclude name="**/_archive"/>
                    <exclude name="**/_archive/*"/>
                    <exclude name="**/CVS/*"/>
                    <exclude name="**/.svn/*"/>
                    <exclude name="**/_new*.*"/>
                    <exclude name="**/*.bak"/>
                    <exclude name="**/*.$$$$$$"/> <!-- escape $ as $$ -->
                </fileset>
            </sftp>
        </ssh>
        <echo  message="upload.zips.documentation ssh-sftp task complete"/>
    </target>
    
    <target name="validate" depends="" description="XML validation checks" >
        <echo message="check XML Spy project file well formed"/>
        <xmlvalidate file="X3dSchemaDtd-XmlSpyProject.spp" warn="true" failonerror="false" lenient="true"/>
        <!-- TODO upgrade to Ant v1.7 using new edition of _Ant in Action_ -->
        <!-- not clear whether this uses schema or DTD.  likely DTD. -->
        <echo message="validate OasisXmlCatalogX3D.xml, build.xml
"/>
        <xmlvalidate failonerror="false" warn="true">
            <fileset dir=".">
                <include name="OasisXmlCatalogX3D.xml"/>
                <exclude name="build.xml"/>
            </fileset>
        </xmlvalidate>
        <xmlvalidate file="build.xml" failonerror="false" warn="true" lenient="yes"/>
        <echo message="well-formed check X3D schemas"/>
        <xmlvalidate failonerror="false" warn="true" lenient="true">
            <fileset dir=".">
                <include name="x3d-3.?.xsd"/>
            </fileset>
        </xmlvalidate>
        <!-- TODO:  validate schema using schema?  fails obscurely...
        <xmlvalidate failonerror="false" warn="true" lenient="false">
            <fileset dir=".">
                <include name="x3d-3.?.xsd"/>
            </fileset>
        </xmlvalidate>
        -->
        <echo message="check DTD versions 3.0, 3.1, 3.2, 3.3 by validating HelloWorld.x3d"/>
        <!-- HelloWorld.x3d must remain X3D version="3.0" for these checks to work -->
        <xmlvalidate file="../x3d/content/examples/HelloWorld.x3d" warn="true" failonerror="false">
            <dtd publicId="ISO//Web3D//DTD X3D 3.0//EN" location="x3d-3.0.dtd"/>
        </xmlvalidate>
        <xmlvalidate file="../x3d/content/examples/HelloWorld.x3d" warn="true" failonerror="false">
            <dtd publicId="ISO//Web3D//DTD X3D 3.1//EN" location="x3d-3.1.dtd"/>
        </xmlvalidate>
        <xmlvalidate file="../x3d/content/examples/HelloWorld.x3d" warn="true">
            <dtd publicId="ISO//Web3D//DTD X3D 3.2//EN" location="x3d-3.2.dtd"/>
        </xmlvalidate>
        <xmlvalidate file="../x3d/content/examples/HelloWorld.x3d" warn="true">
            <dtd publicId="ISO//Web3D//DTD X3D 3.3//EN" location="x3d-3.3.dtd"/>
        </xmlvalidate>
    </target>
    
    <target name="zip" depends="contents.TODO,renameDoctypeDocumentation" description="generate .zip distribution">
        <echo message="** production note:  ensure that latest schema documentation is already generated using XML Spy..."/>
        <zip destfile="X3dSchemaDocumentation3.0.zip">
            <zipfileset dir=".">
                <include name="x3d-schema-changelog.txt"/>
                <include name="x3d-3.0*.xsd"/>
                <include name="X3dSchemaDocumentation3.0/**/*"/>
            </zipfileset>
        </zip>
        <zip destfile="X3dSchemaDocumentation3.1.zip">
            <zipfileset dir=".">
                <include name="x3d-schema-changelog.txt"/>
                <include name="x3d-3.1*.xsd"/>
                <include name="X3dSchemaDocumentation3.1/**/*"/>
            </zipfileset>
        </zip>
        <zip destfile="X3dSchemaDocumentation3.2.zip">
            <zipfileset dir=".">
                <include name="x3d-schema-changelog.txt"/>
                <include name="x3d-3.2*.xsd"/>
                <include name="X3dSchemaDocumentation3.2/**/*"/>
            </zipfileset>
        </zip>
        <zip destfile="X3dSchemaDocumentation3.3.zip">
            <zipfileset dir=".">
                <include name="x3d-schema-changelog.txt"/>
                <include name="x3d-3.3*.xsd"/>
                <include name="X3dSchemaDocumentation3.3/**/*"/>
            </zipfileset>
        </zip>
        <zip destfile="x3d-3.0.validation.zip">
            <zipfileset dir=".">
                <include name="contents.txt"/>
                <include name="contents.html"/>
                <include name="x3d-schema-changelog.txt"/>
                <include name="x3d-3.0*.xsd"/>
                <include name="x3d-dtd-changelog.txt"/>
                <include name="x3d-3.0*.dtd"/>
                <include name="X3dDoctypeDocumentation3.0.html"/>
                <include name="catalog.dtd"/>
                <include name="OasisXmlCatalogX3D.xml"/>
            </zipfileset>
        </zip>
        <zip destfile="x3d-3.1.validation.zip">
            <zipfileset dir=".">
                <include name="contents.txt"/>
                <include name="contents.html"/>
                <include name="x3d-schema-changelog.txt"/>
                <include name="x3d-3.1*.xsd"/>
                <include name="x3d-dtd-changelog.txt"/>
                <include name="x3d-3.1*.dtd"/>
                <include name="X3dDoctypeDocumentation3.1.html"/>
                <include name="catalog.dtd"/>
                <include name="OasisXmlCatalogX3D.xml"/>
            </zipfileset>
        </zip>
        <zip destfile="x3d-3.2.validation.zip">
            <zipfileset dir=".">
                <include name="contents.txt"/>
                <include name="contents.html"/>
                <include name="x3d-schema-changelog.txt"/>
                <include name="x3d-3.2*.xsd"/>
                <include name="x3d-dtd-changelog.txt"/>
                <include name="x3d-3.2*.dtd"/>
                <include name="X3dDoctypeDocumentation3.2.html"/>
                <include name="catalog.dtd"/>
                <include name="OasisXmlCatalogX3D.xml"/>
            </zipfileset>
        </zip>
        <zip destfile="x3d-3.3.validation.zip">
            <zipfileset dir=".">
                <include name="contents.txt"/>
                <include name="contents.html"/>
                <include name="x3d-schema-changelog.txt"/>
                <include name="x3d-3.3*.xsd"/>
                <include name="x3d-dtd-changelog.txt"/>
                <include name="x3d-3.3*.dtd"/>
                <include name="X3dDoctypeDocumentation3.3.html"/>
                <include name="catalog.dtd"/>
                <include name="OasisXmlCatalogX3D.xml"/>
            </zipfileset>
        </zip>
        <zip destfile="x3d-3.all.validation.zip">
            <zipfileset dir=".">
                <include name="contents.txt"/>
                <include name="contents.html"/>
                <include name="x3d-schema-changelog.txt"/>
                <include name="x3d-3.*.xsd"/>
                <include name="x3d-dtd-changelog.txt"/>
                <include name="x3d-3.*.dtd"/>
                <include name="X3dDoctypeDocumentation3.*.html"/>
                <include name="catalog.dtd"/>
                <include name="OasisXmlCatalogX3D.xml"/>
                <include name="*.spp"/>
            </zipfileset>
        </zip>
        <echo>zip complete</echo>
    </target>

    <target name="renameDoctypeDocumentation" description="fix names from Netbeans documentation generator" >
        <echo message="production note: DTD documentation is created manually within Netbeans via context menu for each DTD document"/>
        <move file="x3d-3.0Documentation.html" tofile="X3dDoctypeDocumentation3.0.html" failonerror='false'/>
        <move file="x3d-3.1Documentation.html" tofile="X3dDoctypeDocumentation3.1.html" failonerror='false'/>
        <move file="x3d-3.2Documentation.html" tofile="X3dDoctypeDocumentation3.2.html" failonerror='false'/>
        <move file="x3d-3.3Documentation.html" tofile="X3dDoctypeDocumentation3.3.html" failonerror='false'/>
    </target>

    <target name="cleanupSchemaDocumentation" description="fix header url from XML Spy schema documentation generator" >
        <echo message="production note: schema documentation is created manually within XML Spy via menu for autogenerating schema documentation"/>
        <replace file="X3dSchemaDocumentation3.0/x3d-3.0.html" token="C:\www.web3d.org\specifications\x3d-3"   value="http://www.web3d.org/specifications/x3d-3"  summary="true"/>
        <replace file="X3dSchemaDocumentation3.1/x3d-3.1.html" token="C:\www.web3d.org\specifications\x3d-3"   value="http://www.web3d.org/specifications/x3d-3"  summary="true"/>
        <replace file="X3dSchemaDocumentation3.2/x3d-3.2.html" token="C:\www.web3d.org\specifications\x3d-3"   value="http://www.web3d.org/specifications/x3d-3"  summary="true"/>
        <replace file="X3dSchemaDocumentation3.3/x3d-3.3.html" token="C:\www.web3d.org\specifications\x3d-3"   value="http://www.web3d.org/specifications/x3d-3"  summary="true"/>
        <delete  file="X3dSchemaDocumentation3.0/tmp*.html" verbose="true"/>
        <delete  file="X3dSchemaDocumentation3.1/tmp*.html" verbose="true"/>
        <delete  file="X3dSchemaDocumentation3.2/tmp*.html" verbose="true"/>
        <delete  file="X3dSchemaDocumentation3.3/tmp*.html" verbose="true"/>
    </target>

    <!-- original tasks for specifications/documents found in X3D-Edit project for constructing embedded javahelp -->
    <property name="draft.specification.site"    value="http://www.igraphics.com/Standards"/>
    <property name="web3d.specification.site"    value="http://www.web3d.org/x3d/specifications"/>
    <property name="collada.specification.site"  value="http://www.khronos.org/files"/>
    <property name="X3dAllSpecifications"        value="X3DPublicSpecifications"/>
    <property name="VRML97"                      value="ISO-IEC-14772-VRML97"/>
    <property name="Collada"                     value="collada_spec_1_4.pdf"/>

    <target name="clean.specifications">
        <delete dir="specifications" verbose="true"/>
    </target>

    <!-- <property name="saveZips" value="true"/>  debug: comment out this line to avoid setting property value and thus retain .zip files -->
    <target name="clean.specification.zips" unless="saveZips">
        <delete                 file="documents/${X3dAllSpecifications}.zip" verbose="true"/>
        <delete                 file="documents/${HumanoidAnimation}.zip"    verbose="true"/>
        <delete                 file="documents/${VRML97}.zip"               verbose="true"/>
    </target>

    <target name="get.specifications">
        <mkdir dir="documents"/>
        <!-- X3D abstract specification -->
        <get src="${web3d.specification.site}/${X3dAllSpecifications}.zip"
                                dest="documents/${X3dAllSpecifications}.zip" verbose="true"/>
        <unzip                   src="documents/${X3dAllSpecifications}.zip"
                                dest="documents/" overwrite="true"/>

        <!-- VRML97 Specification -->
        <get src="${web3d.specification.site}/vrml/${VRML97}.zip"
                                dest="documents/${VRML97}.zip" verbose="true"/>
        <unzip                   src="documents/${VRML97}.zip"
                                dest="documents/"  overwrite="true"/>
        <!-- Ecmascript specification -->
        <get src="http://www.web3d.org/specifications/Ecma-262.pdf"
                                dest="documents/Ecma-262.pdf" verbose="true"/>
        <!-- Collada Specification -->
        <get src="${collada.specification.site}/${Collada}"
                                dest="documents/${Collada}" verbose="true"/>

        <!-- important workaround for JavaHelp bug with paths having multiple periods by renaming the offending directories - also see javahelp/x3d-map.xml files -->
        <move file="documents/ISO-IEC-19775-1.2-X3D-AbstractSpecification"                tofile="documents/ISO-IEC-19775-1-2-X3D-AbstractSpecification"/>
        <move file="documents/ISO-IEC-19776-1.2-X3DEncodings-XML"                         tofile="documents/ISO-IEC-19776-1-2-X3DEncodings-XML"/>
        <move file="documents/ISO-IEC-19776-2.2-X3DEncodings-ClassicVRML"                 tofile="documents/ISO-IEC-19776-2-2-X3DEncodings-ClassicVRML"/>
        <move file="documents/ISO-IEC-FCD-19776-3.2-X3DEncodings-CompressedBinary"        tofile="documents/ISO-IEC-FCD-19776-3-2-X3DEncodings-CompressedBinary"/>
        <move file="documents/ISO-IEC-FDIS-19775-2.2-X3D-SceneAccessInterface"            tofile="documents/ISO-IEC-FDIS-19775-2-2-X3D-SceneAccessInterface"/>
<!--
ISO-IEC-19774-HumanoidAnimation
ISO-IEC-19775-1.2-X3D-AbstractSpecification
ISO-IEC-19775-2-X3D-SceneAccessInterface
ISO-IEC-19776-1.2-X3DEncodings-XML
ISO-IEC-19776-2.2-X3DEncodings-ClassicVRML
ISO-IEC-19776-3-X3DEncodings-CompressedBinary
ISO-IEC-19776-X3DEncodings-All-Edition-1
ISO-IEC-19777-1-X3DLanguageBindings-ECMAScript
ISO-IEC-19777-2-X3DLanguageBindings-Java
ISO-IEC-19777-X3DLanguageBindings
ISO-IEC-FCD-19776-3.2-X3DEncodings-CompressedBinary
ISO-IEC-FDIS-19775-2.2-X3D-SceneAccessInterface
-->
        <!-- TODO:  copy best .css -->
        <antcall target="clean.specification.zips"/>
    </target>

    
</project>

