<?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 IBM Corp. 2005, 2006 All Rights Reserved. -->
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="h2d-java" xml:lang="en-us">
    <title>Migrating HTML to DITA with Java command</title>
    <refbody>
        <section>
            <title>Running example</title>
            <ol>
                <li>Start the command window.</li>
                <li>Navigate to the directory of the migration tool.</li>
                <li>(Optional) If the input HTML file contains namespace, 
                  you can remove it by hand, or running the command below:
                  <p>enter the following command when using Saxon: 
                    <codeblock>java com.icl.saxon.StyleSheet mytask.htm preprocess.xsl > mytask.htm</codeblock>
                  </p>
                  <p>enter the following command when using Xalan: 
                    <codeblock>java org.apache.xalan.xslt.Process -in mytask.htm -xsl preprocess.xsl -out mytask.htm</codeblock>
                  </p>
                </li>
                <li>Use Saxon or Xalan directory to run the migration, on the command line, 
                    <p>enter the following command when using Saxon: 
                        <codeblock>java com.icl.saxon.StyleSheet mytask.htm h2d.xsl infotype=task > mytask.dita</codeblock>
                    </p>
                    <p>enter the following command when using Xalan: 
                        <codeblock>java org.apache.xalan.xslt.Process -in mytask.htm -xsl h2d.xsl -out mytask.dita -param infortype task</codeblock>
                    </p>
                </li>
            </ol>
            <p>You can also add other parameters to this properties file. See 
                the following table for details.</p>
            <p><note>The output directory of the generated DITA file should exist, since 
                the XSLT processor can't create it automatically.</note></p>
        </section>
        <section>
            <title>Supported parameters</title>
            <p>The following table lists the supported parameters that you can set with the java command.</p>
            <table>
                <title>Table of supported parameters</title>
                <tgroup cols="3">
                    <colspec colname="col1"/>
                    <colspec colname="col2"/>
                    <colspec colname="col3"/>
                    <thead>
                        <row valign="bottom">
                            <entry colname="col1">Parameter</entry>
                            <entry colname="col2">Description</entry>
                            <entry colname="col3">Required</entry>
                        </row>
                    </thead>
                    <tbody>
                        <row>
                            <entry colname="col1">infotype</entry>
                            <entry colname="col2">The infotype of generated 
                                DITA files. Topic, concept, task, and reference 
                                are valid values. Default is topic.</entry>
                            <entry colname="col3">No.</entry>
                        </row>
                        <row>
                            <entry colname="col1">dita-extension</entry>
                            <entry colname="col2">The extension for links that 
                                go to other DITA topics. ".dita" and ".xml" are 
                                valid values. Default is ".dita".
                                <note>The extension of the generated DITA file 
                                    can't specified by this parameter, it only 
                                    can be specified along with the output 
                                    filename.</note>
                            </entry>
                            <entry colname="col3">No.</entry>
                        </row>
                        <row>
                            <entry colname="col1">FILENAME</entry>
                            <entry colname="col2">It is used to determine 
                                the main topic's ID. <note>The FILENAME should 
                                ends with '.htm' or '.html'. Invalid ID 
                                characters, including all numbers, will be 
                                replaced with letters.</note></entry>
                            <entry colname="col3">No.</entry>
                        </row>
                        <row>
                            <entry colname="col1">default-lang</entry>
                            <entry colname="col2">The default language of 
                                output DITA files. Default is "en-us".
                                <note>For supported language, please refer to 
                                    <codeph>strings.xml</codeph> under the 
                                    directory 
                                    <codeph>${ditaot_dir}/xsl/common</codeph>.
                                </note>
                            </entry>
                            <entry colname="col3">No.</entry>
                        </row>
                    </tbody>
                </tgroup>
            </table>
        </section>
    </refbody>
</reference>