home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / JBuilder8.iso / Solaris / resource / jre / lib / htmlconverter.jar / readme.txt < prev   
Encoding:
Text File  |  2002-09-06  |  10.9 KB  |  316 lines

  1. HTML Converter
  2.  
  3.  
  4. Contents:
  5.  
  6.     1. Introduction
  7.     2. Running the GUI Version of the HTML Converter
  8.  
  9.        2.1 Choosing files within folders to convert
  10.        2.2 Choosing a backup folder
  11.        2.3 Generating a log file
  12.        2.4 Choosing a conversion template
  13.        2.5 Choosing the versioning type
  14.        2.6 Converting
  15.        2.7 Quit or convert more files
  16.        2.8 Details about templates
  17.  
  18.     3. Running the converter from the command line 
  19.  
  20.  
  21. Notes:
  22.  
  23.      o It is recommended that you use the same version HTML
  24.        Converter and Java Plug-in. 
  25.      o Backup all files before converting them with this tool. 
  26.      o Canceling a conversion will not rollback the changes. 
  27.      o Comments within the applet tag are ignored.
  28.      o Additional Java Plug-in documentation provided on the website
  29.  
  30.          http://java.sun.com/products/plugin
  31.      
  32.  
  33. 1. Introduction
  34.  
  35. JavaTM Plug-in HTML Converter is a utility allowing you to convert any
  36. HTML page (file) containing applets to a format that will use the
  37. JavaTM Plug-in. The conversion process is as follows:
  38.   
  39. First, HTML that is not part of an applet is transferred from the
  40. source file to a temporary file.  Then, when an <APPLET tag is
  41. reached, the converter will parse the applet to the first </APPLET tag
  42. (not contained in quotes) and merge the applet data with the
  43. template. (See details about templates below.) If this completes
  44. without error, the original html file is moved to the backup folder
  45. and the temporary file is then renamed as the original file's name.
  46.   
  47. The converter effectively converts the files in place.  Thus, once you
  48. have run the converter, your files are setup to use the Java Plug-in.
  49.  
  50.  
  51. 2. Running the GUI Version of the HTML Converter
  52.  
  53. 2.1 Choosing files within folders to convert
  54.  
  55. To convert all files within a folder, you may type in the path to the
  56. folder, or choose the browse button to select a folder from a dialog.
  57. Once you have chosen a path, you may supply any number of file
  58. specifiers in the "Matching File Names".  Each specifier must be
  59. separated by a comma.  You may use * as a wildcard.  If you put a
  60. filename with wildcard, only that single file will be
  61. converted. Finally, select the checkbox "Include Subfolders", if you
  62. would like all files in nested folders which match the file name to be
  63. converted.
  64.   
  65.  
  66. 2.2 Choosing a backup folder: 
  67.  
  68. Microsoft Windows:
  69.  
  70. The default backup folder path is the source path with an "_BAK"
  71. appended to the name; e.g., if the source path is c:/html/applet.html
  72. (one file to be converted), then the backup path would be c:/html_BAK.
  73. If the source path is c:/html (converting all files in the path), then
  74. the backup path would be c:/html_BAK. The backup path may be changed
  75. by typing a path in the field next to "Backup files to folder:", or by
  76. browsing for a folder.
  77.  
  78. Unix:
  79.  
  80. The default backup folder path is the source path with an "_BAK"
  81. appended to the name; e.g., if the source path is
  82. /home/user1/html/applet.html (one file to be converted), then the
  83. backup path would be /home/user1/html_BAK. If the source path is
  84. /home/user1/html (converting all files in path) then the backup path
  85. would be /home/user1/html_BAK. The backup path may be changed by
  86. typing a path in the field next to "Backup files to folder:", or by
  87. browsing for a folder.
  88.   
  89.  
  90. 2.3 Generating a log file
  91.  
  92. If you would like a log file to be generated, choose the checkbox
  93. "Generate Log File". Type in a path or browse to choose a folder.  The
  94. log file contains basic information related to the converting process.
  95.   
  96.  
  97. 2.4 Choosing a conversion template
  98.  
  99. A default template will be used if none is chosen.  This template will
  100. produce converted html files that will work with IE and Netscape.  If
  101. you would like to use a different template, you may choose it from the
  102. menu on the main screen.  If you choose other, you will be allowed to
  103. choose a file that will be used as the template.  If you choose a
  104. file, be sure that it is a template.
  105.   
  106.  
  107. 2.5 Choosing the versioning type
  108.  
  109. Select the versioning type desired.  If you select the default option,
  110. applets will only use this particular version of Java.  If not
  111. installed, this version will be auto-downloaded if possible.
  112. Otherwise, the user will be redirected to a manual download page.
  113. Please refer to http://java.sun.com/products/plugin for details on the
  114. auto-download process and End of Life (EOL) policies for all Java
  115. releases.
  116.  
  117. If you select the dynamic versioning option, and if no such version is
  118. installed, the current default download for the indicated Java release
  119. family will be auto-downloaded, if possible.  Otherwise, the user will
  120. be redirected to a manual download page.
  121.  
  122.  
  123. 2.6 Converting
  124.  
  125. Click the "Convert..." button to begin the conversion process.  A
  126. dialog will show the files being processed, the number of files
  127. processed, the number of applets found, and number of errors.
  128.   
  129.  
  130. 2.7 Quit or Convert More Files
  131.   
  132. When the conversion is complete, the button in the process dialog will
  133. change from "Cancel" to "Done".  You may choose "Done" to close the
  134. dialog.  At this point, choose "Quit" to close the JavaTM Plug-in HTML
  135. Converter, or select another set of files to convert and choose
  136. "Convert..."  again.
  137.  
  138.  
  139. 2.8 Details about templates
  140.  
  141. The template file is the basis behind converting applets.  It is
  142. simply a text file containing tags that represent parts of the
  143. original applet.  By adding/removing/moving the tags in a template
  144. file, you can alter the output of the converted file.
  145.  
  146. Supported Tags: 
  147.  
  148.    $OriginalApplet$     This tag is substituted with the complete text
  149.                         of the original applet. 
  150.  
  151.    $AppletAttributes$   This tag is substituted with all of the applets
  152.                         attributes (code, codebase, width, height, etc.).
  153.  
  154.    $ObjectAttributes$   This tag is substituted with all the attributes
  155.                         required by the object tag.
  156.  
  157.    $EmbedAttributes$    This tag is substituted with all the attributes
  158.                         required by the embed tag.
  159.  
  160.    $AppletParams$       This tag is substituted with all the applet's
  161.                         <param ...> tags
  162.  
  163.    $ObjectParams$       This tag is substituted with all the <param...>
  164.                         tags required by the object tag.
  165.  
  166.    $EmbedParams$        This tag is substituted with all the <param...>
  167.                         tags required by the embed tag in the form name=value 
  168.  
  169.    $AlternateHTML$      This tag is substituted with the text in the No
  170.                         support for applets area of the original applet
  171.  
  172.    $CabFileLocation$    This is the URL of the cab file that should be
  173.                         used in each template that targets IE.
  174.  
  175.    $NSFileLocation$     This is the URL of the Netscape plugin to be used
  176.                         in each template that targets Netscape.
  177.  
  178.    $SmartUpdate$        This is the URL of the Netscape SmartUpdate to be
  179.                         used in each template that targets Netscape
  180.                  Navigator 4.0 or later.
  181.  
  182.    $MimeType$           This is the MIME type of the Java object. 
  183.  
  184.  
  185. default.tpl is the default template for the converter. The converted
  186. page can be used in IE and Navigator on Microsoft Windows to invoke
  187. JavaTM Plug-in. This template can also be used with Netscape on
  188. Unix.
  189.  
  190. <!-- HTML CONVERTER -->
  191. <OBJECT 
  192.     classid="$ClassId$"
  193.     $ObjectAttributes$ 
  194.     codebase="$CabFileLocation$">
  195.     $ObjectParams$
  196.     <PARAM NAME="type" VALUE="$MimeType$">
  197.     <PARAM NAME="scriptable" VALUE="false">
  198. $AppletParams$
  199.     <COMMENT>
  200.     <EMBED 
  201.             type="$MimeType$" $EmbedAttributes$ $EmbedParams$ 
  202.         scriptable=false 
  203.         pluginspage="$NSFileLocation$">
  204.             <NOEMBED>
  205.         $AlternateHTML$
  206.         </NOEMBED>
  207.     </EMBED>
  208.     </COMMENT>
  209. </OBJECT>
  210.  
  211. <!--
  212. $ORIGINALAPPLET$
  213. -->
  214.  
  215.  
  216. ieonly.tpl -- the converted page can be used to invoke JavaTM Plug-in
  217. in IE on Microsoft Windows only.
  218.  
  219. <!-- HTML CONVERTER -->
  220. <OBJECT
  221.     classid="$ClassId$"
  222.     $ObjectAttributes$
  223.     codebase="$CabFileLocation$">
  224.     $ObjectParams$
  225.     <PARAM NAME="type" VALUE="$MimeType$">
  226.     <PARAM NAME="scriptable" VALUE="false">
  227. $AppletParams$
  228.     $AlternateHTML$
  229. </OBJECT>
  230.  
  231. <!--
  232. $ORIGINALAPPLET$
  233. -->
  234.  
  235.  
  236. nsonly.tpl -- the converted page can be used to invoke JavaTM Plug-in
  237. in Navigator on Microsoft Windows and the Unix operating
  238. environment.
  239.  
  240. <!-- HTML CONVERTER -->
  241. <EMBED 
  242.             type="$MimeType$" $EmbedAttributes$ $EmbedParams$ 
  243.             scriptable=false 
  244.             pluginspage="$NSFileLocation$">
  245.             <NOEMBED>
  246.         $AlternateHTML$
  247.         </NOEMBED>
  248. </EMBED>
  249.  
  250. <!--
  251. $ORIGINALAPPLET$
  252. -->
  253.  
  254.  
  255. extend.tpl -- the converted page can be used in any browser and any
  256. platform. If the browser is IE or Navigator on Microsoft Windows
  257. (Navigator on the Unix operating environment), JavaTM Plug-in will
  258. be invoked. Otherwise, the browser's default JVM is used.
  259.   
  260. <!-- HTML CONVERTER -->
  261. <SCRIPT LANGUAGE="JavaScript"><!--
  262.     var _info = navigator.userAgent; 
  263.     var _ns = false; 
  264.     var _ns6 = false;
  265.     var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
  266. //--></SCRIPT>
  267.     <COMMENT>
  268.         <SCRIPT LANGUAGE="JavaScript1.1"><!--
  269.         var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0) || (_info.indexOf("AIX") > 0) || (_info.indexOf("OS/2") > 0)));
  270.         var _ns6 = ((_ns == true) && (_info.indexOf("Mozilla/5") >= 0));
  271. //--></SCRIPT>
  272.     </COMMENT>
  273.  
  274. <SCRIPT LANGUAGE="JavaScript"><!--
  275.     if (_ie == true) document.writeln('<OBJECT classid="$ClassId$" $ObjectAttributes$ codebase="$CabFileLocation$"><NOEMBED><XMP>');
  276.     else if (_ns == true && _ns6 == false) document.writeln('<EMBED 
  277.         type="$MimeType$" $EmbedAttributes$ $EmbedParams$ 
  278.         scriptable=false 
  279.         pluginspage="$NSFileLocation$"><NOEMBED><XMP>');
  280. //--></SCRIPT>
  281. <APPLET $AppletAttributes$></XMP>
  282.     $ObjectParams$
  283.     <PARAM NAME="type" VALUE="$MimeType$">
  284.     <PARAM NAME="scriptable" VALUE="false">
  285. $AppletParams$
  286. $AlternateHTML$
  287. </APPLET>
  288. </NOEMBED>
  289. </EMBED>
  290. </OBJECT>
  291.  
  292. <!--
  293. $ORIGINALAPPLET$
  294. -->
  295.  
  296.  
  297. 3. Running the converter from the command line
  298.  
  299. Usage: HtmlConverter [-option1 value1 [-option2 value2 [...]]] [-simulate]  [filespecs]
  300.  
  301. where options include:
  302.  
  303.     -source:    Path to get original files.  Default: <userdir>
  304.     -dest:      Path to write converted files.  Default: <userdir>
  305.     -backup:    Path to write backup files.  Default: <dirname>_BAK
  306.     -f:         Force overwrite backup files.
  307.     -subdirs:   Should files in subdirectories be processed.
  308.     -template:  Path to template file.  Use default if unsure.
  309.     -log:       Path to write log.  If not provided, no log is written.
  310.     -progress:  Display progress while converting.  Default: true
  311.     -simulate:  Display the specifics to the conversion without converting.
  312.     -latest:    Use the latest JRE supporting the release mimetype.
  313.     -gui:       Display the graphical user interface for the converter.
  314.  
  315.     filespecs:  Space delimited list of files specs.  Default: "*.html *.htm" (quotes required)
  316.