buildsample.xml 2.7 KB

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