<project name="witbd_std" default="build" basedir=".">

<!-- 
	<dc:creator>Rufus Pollock. rufus.pollock att witbd.org</dc:creator>
	<dct:created>2004-01-02</dct:created>
	
	TODO: factor out the regex expressions for entity replacement into one place.
-->

<!-- ===================== Property Definitions =========================== -->


<!--

  Each of the following properties are used in the build script.
  Values for these properties are set by the first place they are
  defined, from the following list:

  * Definitions on the "ant" command line (ant -Dfoo=bar compile).

  * Definitions from a "build.properties" file in this directory
    
  * Definitions from a "build.properties" file in the parent directory

  * Definitions from a "build.properties" file in the developer's
    home directory.
    
  * Definitions from a sitebuilder.properties file in this directory

  * Default definitions in this build.xml file.

  You will note below that property values can be composed based on the
  contents of previously defined properties.  This is a powerful technique
  that helps you minimize the number of changes required when your development
  environment is modified.  Note that property composition is allowed within
  "build.properties" files as well as in the "build.xml" script.

-->


  <property file="build.properties"/>
  <property file="../build.properties"/>
  <property file="${user.home}/build.properties"/>
  
  <!-- this is where most of properties should come from. Put in a separate
  	file so that java code can get access
  	-->
  <property file="sitebuilder.properties"/>


<!-- ==================== File and Directory Names ======================== -->

<!--

  These properties generally define file and directory names (or paths) that
  affect where the build process stores its outputs.

-->

	<property name="input.file.name" value="mphil_industrial_revolution_essay.xml" />
	<property name="output.file.name" value="${input.file.name}.html" />
	<property name="input.dir" location="${basedir}/in"/>
	<property name="output.dir" location="${basedir}/out"/>
	
	<property name="input" location="${input.dir}/${input.file.name}"/>
	<property name="output" location="${output.dir}/${output.file.name}"/>
	
	<property name="xsl.dir" location="${basedir}/xsl" />
	<property name="xsl.witbd.master" value="text_master.xsl" />
	<property name="xsl.witbd.biblio-to-bibtex" value="witbd_biblio_to_bibtex.xsl" />
	
	
<!-- 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//                      TARGETS
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--> 

 
	<target name="witbd.master.run" description="Process Witbd Std Xml to HTML">
		
		<xslt 
			in="${input}"
			out="${output}"
			style="${xsl.dir}/${xsl.witbd.master}"
			force="true"
			reloadstylesheet="false"
			/>
	
  </target>
  
  <target name="biblio.to.bibtex" description="Process Witbd Biblio Xml to Bibtex">
		
		<xslt 
			in="${input}"
			out="${output}"
			style="${xsl.dir}/${xsl.witbd.biblio-to-bibtex}"
			force="true"
			reloadstylesheet="false"
			/>
	
  </target>
  
  <target name="prepare" description="create input/output directories etc">
  	<mkdir dir="in" />
  	<mkdir dir="out" />
  </target>
  
</project>
