<..Xtpipes.java..>
package xtpipes;
/* Xtpipes.java (2014-05-24-12:32), generated from xtpipes.tex
Copyright (C) 2009-2010 TeX Users Group
Copyright (C) 2002-2009 Eitan M. Gurari
<.TeX4ht copyright.> */
<.xtpipes imports.>
<.class XtpipesPrintWriter .>
public class Xtpipes {
<.xtpipes fields.>
<.static void main(String []).>
<.static void xtpipes(String [], OutputStream, PrintWriter).>
<.static void xtpipes(String [], OutputStreamWriter, PrintWriter).>
<.static void xtpipes(String [], XtpipesPrintWriter, PrintWriter).>
<.static Document getDOM(...).>
<.static void mainMethod(String []).>
<.static void execute( node ).>
<.static String execute( node, xml ).>
<.static void instructionErr(...).>
<.static String serialize( dom ).>
<.static void cleanXmlns( dom ).>
}
<.class XtpipesEntityResolver.>
-_-_-
NOTE: We can not place Xtpipes.class and xtpipes.class at the same directory because MS Windows get confused between the two.
<..xtpipes.java..>
/* xtpipes.java (2014-05-24-12:32), generated from xtpipes.tex
Copyright (C) 2009-2010 TeX Users Group
Copyright (C) 2002-2009 Eitan M. Gurari
<.TeX4ht copyright.> */
import xtpipes.*;
public class xtpipes {
public static void main(String [] args) throws Exception {
Xtpipes.main(args);
} }
-_-_-
<..static String execute( node, xml )..>
public static String execute( Node node, String xml )
throws Exception {
String name = ".";
String old = (String) map.get(name);
map.put( name, (Object) xml );
execute( node.getFirstChild() );
String s = (String) map.get(name);
if( old != null ){ map.put( name, (Object) old ); }
return s;
}
-_-_-
<..xtpipes fields..>
private static HashMap <String,Object> map;
private static boolean needScript;
-_-_-
The members of xtpipes need to be initiated each time the methods of the program are invoked from external point. That can happen multiple times for a given run. Hence, the fields are not initiated in the declaration points, but within the main method. All the external calls go directly or indirectly through that method.
<..init fields..>
map = new HashMap <String,Object> ();
needScript = true;
-_-_-
<..xtpipes imports..>
// import xtpipes.util.InputObject;
// import xtpipes.util.FileInfo;
import java.net.URLConnection;
import java.io.*;
import java.lang.reflect.*;
import java.util.HashMap;
import java.util.Stack;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.*;
import org.w3c.dom.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import java.net.URL;
-_-_-