Diff for DITA Project Starter Kit
Contemplation
DITA topics of interest
Thu, 2008-09-18 16:49 by sowmyakannan | Thu, 2008-09-18 16:57 by sowmyakannan | ||
---|---|---|---|
Changes to Body | |||
Line 41 | Line 41 | ||
|
| ||
</p>
| </p>
| ||
- | <pre>
| + | set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_06
|
- | set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_06
| + | |
- | </pre>
| + | |
<br />
| <br />
| ||
- | <pre>
| + | set PATH=%DITA_DIR%tools\ant\bin;%JAVA_HOME%\bin;%PATH%
|
- | set PATH=%DITA_DIR%tools\ant\bin;%JAVA_HOME%\bin;%PATH%
| + | |
- | </pre>
| + | |
<p>
| <p>
| ||
|
| ||
Line 72 | Line 68 | ||
<li>Edit NewDITAProjectSource/runbuild.bat or NewDITAProjectSource/runbuild.sh (depending on your environment). </li>
| <li>Edit NewDITAProjectSource/runbuild.bat or NewDITAProjectSource/runbuild.sh (depending on your environment). </li>
| ||
<li>Change the parameters specified in the runbuild file to make them specific to your project (detailed information can be found in the runbuild file) </li>
| <li>Change the parameters specified in the runbuild file to make them specific to your project (detailed information can be found in the runbuild file) </li>
| ||
- | <li>In your DITA command window, change directory to NewDITAProjectSource and execute the command runbuild dita2xhtml. </li>
| + | <li>In your DITA command window, change directory to NewDITAProjectSource and execute the command <em>runbuild dita2xhtml</em>. </li>
|
<li>If all goes well, you should see the following messages. The NewDITAProjectOutput directory should be created at the location specified previously.
| <li>If all goes well, you should see the following messages. The NewDITAProjectOutput directory should be created at the location specified previously.
| ||
<p>
| <p>
| ||
Line 78 | Line 74 | ||
</p>
| </p>
| ||
<pre>
| <pre>
| ||
- | Buildfile: ant_scripts\newDITAProject_all.xml
| + | Buildfile: ant_scripts\newDITAProject_all.xml
|
[echo]
| [echo]
| ||
[echo] Building project.
| [echo] Building project.
| ||
Line 127 | Line 123 | ||
<li>Decide on a project name. For the sake of this example, assume the new name is CoolTech. </li>
| <li>Decide on a project name. For the sake of this example, assume the new name is CoolTech. </li>
| ||
<li>Rename the NewDITAProjectSource directory to CoolTechSource </li>
| <li>Rename the NewDITAProjectSource directory to CoolTechSource </li>
| ||
- | <li>Edit CoolTechSource/runbuild.bat. Search and replace the string "NewDITAProject" with "CoolTech". You should now have
| + | <li>Edit CoolTechSource/runbuild.bat. Search and replace the string "NewDITAProject" with "CoolTech". You should now have <br />
|
- | <pre>
| + | -Dprojdir=somepath\CoolTechSource <br />
|
- | -Dprojdir=somepath\CoolTechSource
| + | -Doutdir=somepath\CoolTechOutput <br />
|
- | -Doutdir=somepath\CoolTechOutput
| + | -Dmap=CoolTech.ditamap <br />
|
- | -Dmap=CoolTech.ditamap
| + | -f ant_scripts\CoolTech_all.xml </li>
|
- | -f ant_scripts\CoolTech_all.xml
| + | |
- | </pre>
| + | |
- | </li>
| + | |
<li>Rename the file CoolTechSource\NewDITAProject.ditamap to CoolTechSource\CoolTech.ditamap </li>
| <li>Rename the file CoolTechSource\NewDITAProject.ditamap to CoolTechSource\CoolTech.ditamap </li>
| ||
<li>Rename CoolTechSource\ant_scripts\newDITAProject_all.xml to CoolTechSource\ant_scripts\CoolTech_all.xml </li>
| <li>Rename CoolTechSource\ant_scripts\newDITAProject_all.xml to CoolTechSource\ant_scripts\CoolTech_all.xml </li>
| ||
- | <li>Edit CoolTechSource\ant_scripts\CoolTech_all.xml. Change
| + | <li>Edit CoolTechSource\ant_scripts\CoolTech_all.xml. Change <br />
|
- | <pre>
| + | |
- | <project name="newditaproject" default="xhtml">
| + | |
- | </pre>
| + | |
<p>
| <p>
| ||
- | to
| + | <project name="newditaproject" default="xhtml">
|
+ | </p>
| ||
+ | <p>
| ||
+ | to
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | <project name="cooltech" default="xhtml">
| ||
</p>
| </p>
| ||
- | <pre>
| ||
- | <project name="cooltech" default="xhtml">
| ||
- | </pre>
| ||
</li>
| </li>
| ||
- | <li>From your DITA command window, execute the command runbuild dita2xhtml and verify output. </li>
| + | <li>From your DITA command window, execute the command <em>runbuild dita2xhtml</em> and verify output. </li>
|
<li>Add or edit the included topics and map using a DITA editor, any XML editor, or even vi (depending on your comfort level). Build the source to see your changes. </li>
| <li>Add or edit the included topics and map using a DITA editor, any XML editor, or even vi (depending on your comfort level). Build the source to see your changes. </li>
| ||
</ul>
| </ul>
|
Contemplation
DITA Project Starter Kit
Are you new to the world of DITA? Have you read the various DITA primers available? If so, you are probably now raring to play with DITA.
Ahh.. writer's block! How do you get started? What and where are you supposed to write? A starting point into a small DITA project would be nice.
Here is a DITA project starter kit that you can use to experiment with DITA, create topics and try building various outputs. The DITA project starter kit contains the following:
-
Sample concept, task and reference topic files and a ditamap
-
Ant scripts to help you build your first DITA project
Follow the steps below to setup your environment for DITA and get started!
Setting up your DITA Environment
If this is the first time you are working with DITA, and have not setup the DITA Open Toolkit, follow the steps below. Otherwise, skip to the section titled "Starting a new DITA Based Project" .
- Download and install Java SE (> version 5.0. I have been using 6.0 without problems so far).
- Download and install the full package distribution of the latest DITA Open Toolkit (latest at this time is version 1.4.2.1).
- Edit DITA-OT1.4.2.1/startcmd.bat and set JAVA_HOME and modify PATH environment variables. For example,
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_06
set PATH=%DITA_DIR%tools\ant\bin;%JAVA_HOME%\bin;%PATH%
- Run DITA-OT1.4.2.1/startcmd.bat to open a DITA command window. These scripts set a few DITA specific environment variables. (Note: If using Unix, you may need to correct startcmd.sh to use DITA_DIR instead of DITA_HOME, and also add the Java related variables).
- In the DITA command window, make sure DITA_DIR and ANT_HOME environment variables are set.
- Type java -version to make sure that Java has been setup properly.
Starting a new DITA Based Project
- Download and unzip the attached NewDITAProjectSource.zip to a local folder. This zip file has the following folders:
- Edit NewDITAProjectSource/runbuild.bat or NewDITAProjectSource/runbuild.sh (depending on your environment).
- Change the parameters specified in the runbuild file to make them specific to your project (detailed information can be found in the runbuild file)
- In your DITA command window, change directory to NewDITAProjectSource and execute the command runbuild dita2xhtml.
- If all goes well, you should see the following messages. The NewDITAProjectOutput directory should be created at the location specified previously.
- View NewDITAProjectOutput/xhtml/index.html in a web browser and see xhtml output
Creating Custom Content
Follow the steps below to further customize this project template to your needs.
- Decide on a project name. For the sake of this example, assume the new name is CoolTech.
- Rename the NewDITAProjectSource directory to CoolTechSource
- Edit CoolTechSource/runbuild.bat. Search and replace the string "NewDITAProject" with "CoolTech". You should now have
-Dprojdir=somepath\CoolTechSource
-Doutdir=somepath\CoolTechOutput
-Dmap=CoolTech.ditamap
-f ant_scripts\CoolTech_all.xml - Rename the file CoolTechSource\NewDITAProject.ditamap to CoolTechSource\CoolTech.ditamap
- Rename CoolTechSource\ant_scripts\newDITAProject_all.xml to CoolTechSource\ant_scripts\CoolTech_all.xml
- Edit CoolTechSource\ant_scripts\CoolTech_all.xml. Change
<project name="newditaproject" default="xhtml">
to
<project name="cooltech" default="xhtml">
- From your DITA command window, execute the command runbuild dita2xhtml and verify output.
- Add or edit the included topics and map using a DITA editor, any XML editor, or even vi (depending on your comfort level). Build the source to see your changes.
Reference
DITA Open Toolkit User Guide (useful information on using and troubleshooting DITA OT)
DITA Language Specification (understand how and where DITA tags should be used)
DITA Architectural Specification (more technical stuff)
Attachment | Size |
---|---|
NewDITAProjectSource.zip | 53.09 KB |