Class Transform

java.lang.Object
  |
  +--Transform

public class Transform
extends java.lang.Object

This class repairs invalid HTML & javascript code produced by IHMC Concept Map Tools, v2.9.1. This code is experimental and is recommended only for testing purposes.


Constructor Summary
Transform()
           
 
Method Summary
 void doTransform()
          Perform actual transforming & element cleanup.
 void fromFile(java.lang.String filename)
          Creates a DOM representation of an XML document given in filename.
static void main(java.lang.String[] argv)
          Main program.
 void toStream(java.io.Writer os)
          Transforms DOM representation to stream using XHTML 1.0 Transitional doctype.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transform

public Transform()
Method Detail

fromFile

public void fromFile(java.lang.String filename)
              throws org.xml.sax.SAXException,
                     javax.xml.parsers.ParserConfigurationException,
                     java.io.IOException
Creates a DOM representation of an XML document given in filename.

Parameters:
filename - input file
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException

doTransform

public void doTransform()
Perform actual transforming & element cleanup. Cleanup is done using W3C DOM interfaces. Javascript code is moved to a separate file that is referenced from HTML. Most formatting information is omitted or simplified. Inline pictures (filenames starting with 'in_' are embedded directly to HTML page, no links.


toStream

public void toStream(java.io.Writer os)
              throws javax.xml.transform.TransformerException
Transforms DOM representation to stream using XHTML 1.0 Transitional doctype.

Parameters:
os - Writer output stream writer
javax.xml.transform.TransformerException

main

public static void main(java.lang.String[] argv)
Main program.

Parameters:
argv - Input arguments. First argument is used as input file, second as output file.