| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?xml version="1.0" encoding="utf-8"?>
- <!--
- This file is part of the DITA Open Toolkit project hosted on
- Sourceforge.net. See the accompanying license.txt file for
- applicable licenses.
-
- (C) Copyright Shawn McKenzie, 2007. All Rights Reserved.
- *-->
- <?xml-stylesheet href="../../../../xsl/ditaview_shell.xsl" type="text/xsl"?>
- <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
- "../../../../dtd/concept.dtd">
- <concept id="tocjs_ant" xml:lang="en-us">
- <title>Ant tasks</title>
- <conbody>
- <p>The tocjs extension is meant to work with a project that generates HTML. For instance, assume you have an existing ant task:
- <codeblock>
- <target name="myproj2html" depends="use-init">
- <antcall target="dita2xhtml">
- <param name="args.input"
- value="projects${file.separator}myproject${file.separator}GettingStartedGuide.ditamap"/>
- <param name="output.dir" value="output${file.separator}myproject"/>
- <param name="args.css" value="testvalue.css"/>
- </antcall>
- </target>
- </codeblock>
- To create tocjs JavaScript output and copy related topics into place, you could create the following
- ant target.
- <codeblock>
- <target name="myproj2tocjs" description="Generate tocjs javascript file">
- <antcall target="dita2tocjs">
- <param name="transtype" value="tocjs"/>
- <param name="args.input"
- value="projects${file.separator}myproject${file.separator}GettingStartedGuide.ditamap"/>
- <param name="output.file"
- value="output${file.separator}myproject${file.separator}myproject${file.separator}toctree.js"/>
- </antcall>
- <copy todir="output${file.separator}myproject${file.separator}myproject">
- <fileset dir="${dita.dir}${file.separator}demo${file.separator}tocjs${file.separator}basefiles">
- <include name="**/*"/></fileset>
- </copy>
- </target>
- </codeblock>
- The above task generates tocjs output and copies the related files from the tocjs
- <filepath>basefiles</filepath> directory. You will also need to maitan and copy into place a
- frameset file. For an exaple of how this is done, take a look at the ant tasks in
- <filepath>demo/tocjs/buildsample.xml</filepath> and the related <filepath>basefiles</filepath>
- directories</p>
- <note type="tip">For more examples of working ant tasks, check the
- <filepath>buildsample.xml</filepath>file in the <filepath>demo/tocjs</filepath> directory.</note>
- </conbody>
- <related-links>
- <link href="basefiles.xml"/>
- <link href="paths.xml"/>
- </related-links>
- </concept>
|