buildsample.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. This file is part of the DITA Open Toolkit project hosted on
  4. Sourceforge.net. See the accompanying license.txt file for
  5. applicable licenses.
  6. (C) Copyright Shawn McKenzie, 2007. All Rights Reserved.
  7. UPDATES:
  8. August 2011: Updated by Robert D Anderson for SF Bug 3392718
  9. *-->
  10. <project name="docondoc" default="sample2tocjs">
  11. <import file="..${file.separator}..${file.separator}build.xml"/>
  12. <property name="content.frame" value="contentwin"/>
  13. <target name="sample2html" depends="use-init">
  14. <antcall target="dita2xhtml">
  15. <param name="args.input"
  16. value="sample${file.separator}tocjs.ditamap"/>
  17. <param name="output.dir" value="out${file.separator}sample"/>
  18. <param name="args.css"
  19. value="sample${file.separator}basefiles${file.separator}sample.css"/>
  20. <param name="args.copycss" value="yes"/>
  21. </antcall>
  22. <copy
  23. file="sample${file.separator}basefiles${file.separator}frameset.html"
  24. tofile="out${file.separator}sample${file.separator}frameset.html"/>
  25. <!--<antcall target="sample2tocjs"/>-->
  26. </target>
  27. <target name="sample2tocjs" description="Generate tocjs javascript file" depends="sample2html">
  28. <!-- Update August 2011: Calling dita2tocjs will repeat the entire HTML build, ending with
  29. a process to create toctree.js. "sample2html" has already run, so the map and HTML
  30. will always exist in the temp directory. Rather than calling a new build to repeat
  31. that HTML conversion, just run the XSLT process to create toctree.js. -->
  32. <xslt in="${dita.temp.dir}${file.separator}tocjs.ditamap" out="out${file.separator}sample${file.separator}toctree.js" style="${dita.plugin.com.sophos.tocjs.dir}/xsl/tocjs.xsl">
  33. <param name="contentwin" expression="${content.frame}" if="content.frame" />
  34. <param name="htmlext" expression="${out.ext}" />
  35. </xslt>
  36. <!--<antcall target="dita2tocjs">
  37. <param name="transtype" value="tocjs"/>
  38. <param name="args.input"
  39. value="sample${file.separator}tocjs.ditamap"/>
  40. <param name="output.file"
  41. value="out${file.separator}sample${file.separator}toctree.js"/>
  42. </antcall>-->
  43. <copy todir="out${file.separator}sample"><fileset
  44. dir="${dita.plugin.com.sophos.tocjs.dir}${file.separator}basefiles"><include name="**/*"/></fileset></copy>
  45. </target>
  46. <target name="sampleclean" description="clean tocjs sample output">
  47. <delete dir="${dita.plugin.com.sophos.tocjs.dir}${file.separator}out"/>
  48. </target>
  49. </project>