From: Claudio Sacerdoti Coen Date: Fri, 17 Nov 2000 10:38:21 +0000 (+0000) Subject: xaland-* moved in xsltd repository X-Git-Tag: nogzip~166 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=dc5e3fb57fb6cc1985873f0126099a5fbb0b6e66;p=helm.git xaland-* moved in xsltd repository --- diff --git a/helm/interface/Makefile b/helm/interface/Makefile index 942b0ca65..14ca2eb19 100644 --- a/helm/interface/Makefile +++ b/helm/interface/Makefile @@ -169,34 +169,4 @@ clean: reduction.opt fix_params fix_params.opt mmlinterface \ mmlinterface.opt mmlinterface2 mmlinterface2.opt -start-xaland: - java -ss1024K -oss8192K \ - xaland 12345 12346 \ - $(COQV)/examples/style/rootcontent.xsl \ - $(COQV)/examples/style/annotatedpres.xsl \ - $(COQV)/examples/style/theory_content.xsl \ - $(COQV)/examples/style/theory_pres.xsl - -start-xaland-2: - java -ss1024K -oss8192K \ - xaland2 12345 12346 \ - $(COQV)/examples/style/rootcontent.xsl \ - $(COQV)/examples/style/annotatedpres.xsl \ - $(COQV)/examples/style/theory_content.xsl \ - $(COQV)/examples/style/theory_pres.xsl - -start-xaland-old: - java xaland 12345 12346 \ - $(COQV)/examples/style/style_prima_del_linguaggio_naturale/rootcontent.xsl \ - $(COQV)/examples/style/style_prima_del_linguaggio_naturale/annotatedpres.xsl \ - $(COQV)/examples/style/style_prima_del_linguaggio_naturale/theory_content.xsl \ - $(COQV)/examples/style/style_prima_del_linguaggio_naturale/theory_pres.xsl - -start-xaland3: - java xaland 12347 12348 \ - $(COQV)/examples/style/rootcontent.xsl \ - $(COQV)/examples/style/annotatedpres.xsl \ - $(COQV)/examples/style/theory_content.xsl \ - $(COQV)/examples/style/theory_pres.xsl - include .depend diff --git a/helm/interface/cadet b/helm/interface/cadet index fc24779f0..7df42fecd 100755 --- a/helm/interface/cadet +++ b/helm/interface/cadet @@ -1,25 +1,15 @@ #! /bin/sh -export PATH=~/HELM/installation/jdk118/bin:$PATH - -#export CLASSPATH=/home/cadet/sacerdot/xalan-j_1_1/xalan.jar:/home/cadet/sacerdot/xalan-j_1_1/xerces.jar:. -export CLASSPATH=~/HELM/installation/xalan-j_1_2/xalan.jar:~/HELM/installation/xalan-j_1_2/xerces.jar:. -#export CLASSPATH=~/HELM/installation/xalan-j_1_2_1/xalan.jar:~/HELM/installation/xalan-j_1_2_1/xerces.jar:. -#export CLASSPATH=/home/cadet/sacerdot/xalan-j_2_0_D01/bin/xalan.jar:/home/cadet/sacerdot/xalan-j_2_0_D01/bin/xerces.jar:. - -#export CLASSPATH=$CLASSPATH:/home/lpadovan/helm/java/xalan_1_1/xalan.jar -#export CLASSPATH=$CLASSPATH:/home/lpadovan/helm/java/xalan_1_1/xerces.jar -#export CLASSPATH=$CLASSPATH:/home/lpadovan/helm/java/saxon-5.3.2/saxon.jar - # Per (my)Coq 6.3.0 export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH # WARNING!!! No "//" in the middle of the path, nor a "/" at the end!!!! + +#V6.2 export HELM_CONFIGURATION_PREFIX=~/HELM/installation -export COQV=V6.2 +#V7 #export HELM_CONFIGURATION_PREFIX=/home/cadet/sacerdot -#export COQV=V7 export T1LIB_CONFIG=./t1.config diff --git a/helm/interface/isterix b/helm/interface/isterix index 61392b01c..17ddfc9d7 100755 --- a/helm/interface/isterix +++ b/helm/interface/isterix @@ -1,12 +1,17 @@ #! /bin/sh -export PATH=$PATH:/opt/java/jdk118/bin/ +# WARNING!!! No "//" in the middle of the path, nor a "/" at the end!!!! -export CLASSPATH=. -export CLASSPATH=$CLASSPATH:/home/lpadovan/helm/java/xalan_1_1/xalan.jar -export CLASSPATH=$CLASSPATH:/home/lpadovan/helm/java/xalan_1_1/xerces.jar -export CLASSPATH=$CLASSPATH:/home/lpadovan/helm/java/saxon-5.3.2/saxon.jar +#V6.2 +#export HELM_CONFIGURATION_PREFIX=~/HELM/installation # Per (my)Coq 6.3.0 export LD_LIBRARY_PATH=/home/lpadovan/helm/usr/lib/:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH + +#export T1LIB_CONFIG=./t1.config + +# Stix font +#xset fp +#xset fp+ ~/HELM/installation/fonts/ +#xset fp rehash diff --git a/helm/interface/xaland-cpp/xaland.cpp b/helm/interface/xaland-cpp/xaland.cpp deleted file mode 100644 index e22140267..000000000 --- a/helm/interface/xaland-cpp/xaland.cpp +++ /dev/null @@ -1,207 +0,0 @@ -// Base header file. Must be first. -#include - -#include -#include - -#include - -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -int main(int argc, const char* []) -{ -#if !defined(XALAN_NO_NAMESPACES) - using std::cerr; - using std::endl; - using std::ofstream; -#endif - - if (argc != 1) { - cerr << "Usage: SimpleTransform" - << endl - << endl; - } else { - try { - // Call the static initializer for Xerces... - XMLPlatformUtils::Initialize(); - - { - // Initialize the Xalan XSLT subsystem... - XSLTInit theInit; - - // Create the support objects that are necessary for - // running the processor... - XercesDOMSupport theDOMSupport; - XercesParserLiaison theParserLiaison(theDOMSupport); - XPathSupportDefault theXPathSupport(theDOMSupport); - XSLTProcessorEnvSupportDefault theXSLTProcessorEnvSupport; - XObjectFactoryDefault theXObjectFactory; - XPathFactoryDefault theXPathFactory; - - // Create a processor... - XSLTEngineImpl theProcessor( - theParserLiaison, - theXPathSupport, - theXSLTProcessorEnvSupport, - theDOMSupport, - theXObjectFactory, - theXPathFactory); - - // Connect the processor to the support object... - theXSLTProcessorEnvSupport.setProcessor(&theProcessor); - - // Create a stylesheet construction context, and a stylesheet - // execution context... - StylesheetConstructionContextDefault theConstructionContext( - theProcessor, - theXSLTProcessorEnvSupport, - theXPathFactory); - - StylesheetExecutionContextDefault theExecutionContext( - theProcessor, - theXSLTProcessorEnvSupport, - theXPathSupport, - theXObjectFactory); - - // Our input files...The assumption is that the executable will be - // run from same directory as the input files. - const XalanDOMString theXMLFileName("foo.xml"); - const XalanDOMString theXSLFileName("foo.xsl"); - - // Our input sources... - XSLTInputSource theInputSource(c_wstr(theXMLFileName)); - XSLTInputSource theStylesheetSource(c_wstr(theXSLFileName)); - - // Our output target... - const XalanDOMString theOutputFileName("foo.out"); - XSLTResultTarget theResultTarget(theOutputFileName); - - theProcessor.process( - theInputSource, - theStylesheetSource, - theResultTarget, - theConstructionContext, - theExecutionContext); - - } - - // Call the static terminator for Xerces... - XMLPlatformUtils::Terminate(); - } - catch(...) { - cerr << "Exception caught!!!" - << endl - << endl; - } - } - - return 0; -} - -/**************************************************/ -/* - -public class xaland { - public static void Transform(StylesheetRoot style, String xmlSourceURL, String OutputURL) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - XSLTInputSource xmlSource = new XSLTInputSource (xmlSourceURL); - XSLTResultTarget xmlResult = new XSLTResultTarget (OutputURL); - style.process(xmlSource, xmlResult); - } - - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - int port = Integer.parseInt(argv[0]); - int port2 = Integer.parseInt(argv[1]); - String xsl1 = argv[2]; - String xsl2 = argv[3]; - String theory_xsl1 = argv[4]; - String theory_xsl2 = argv[5]; - - XSLTProcessor theory_processor = - XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison()); - StylesheetRoot theory_style1 = - theory_processor.processStylesheet(theory_xsl1); - theory_processor.reset(); - StylesheetRoot theory_style2 = - theory_processor.processStylesheet(theory_xsl2); - theory_processor.setStylesheet(theory_style2); - - XSLTProcessor processor = - XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison()); - StylesheetRoot style1 = processor.processStylesheet(xsl1); - processor.reset(); - StylesheetRoot style2 = processor.processStylesheet(xsl2); - processor.setStylesheet(style2); - - DatagramSocket socket = new DatagramSocket(port); - - System.out.println("Demon activated on input port " + port + - " and output port " + port2); - while(true) { - System.out.print("Ready..."); - - /* Warning: the packet must be a fresh one! * / - DatagramPacket packet = new DatagramPacket(new byte[1024],1024); - socket.receive(packet); - byte data[] = packet.getData(); - int datalen = packet.getLength(); - String received = new String(data,0,datalen); - - int first = received.indexOf(' '); - int last = received.lastIndexOf(' '); - String mode = received.substring(0,first); - String input = received.substring(first+1,last); - String output = received.substring(last+1); - - System.out.println("request received! Parameters are"); - System.out.println("Mode: " + mode + " "); - System.out.println("Input file: \"" + input + "\""); - System.out.println("Output file: \"" + output + "\"\n"); - - if ((new File(output)).exists()) { - System.out.println("Using cached version\n"); - } else { - FileOutputStream fout = new FileOutputStream(output); - if (mode.equals("cic")) { - processor.setDocumentHandler(style2.getSAXSerializer(fout)); - XSLTResultTarget content = new XSLTResultTarget(processor); - style1.process(new XSLTInputSource(input), content); - } else if (mode.equals("theory")) { - theory_processor.setDocumentHandler( - theory_style2.getSAXSerializer(fout)); - XSLTResultTarget content = - new XSLTResultTarget(theory_processor); - theory_style1.process(new XSLTInputSource(input), content); - } - } - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket2 = new DatagramSocket(); - - byte buf[] = new byte[0]; - DatagramPacket packet2 = new DatagramPacket(buf,0,address,port2); - - socket2.send(packet2); - } - } -} - -*/ diff --git a/helm/interface/xaland-java/rompi.class b/helm/interface/xaland-java/rompi.class deleted file mode 100644 index 4abfe3865..000000000 Binary files a/helm/interface/xaland-java/rompi.class and /dev/null differ diff --git a/helm/interface/xaland-java/rompi.java b/helm/interface/xaland-java/rompi.java deleted file mode 100644 index 6a633dbc9..000000000 --- a/helm/interface/xaland-java/rompi.java +++ /dev/null @@ -1,12 +0,0 @@ -import java.net.*; - -public class rompi { - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException - { - /* Wait forever ;-) */ - DatagramSocket socket2 = new DatagramSocket(12346); - DatagramPacket packet2 = new DatagramPacket(new byte[1],1); - System.out.println("Ho preso il socket e non lo lascio piu', caro pu, caro pu"); - socket2.receive(packet2); - } -} diff --git a/helm/interface/xaland-java/sped.class b/helm/interface/xaland-java/sped.class deleted file mode 100644 index cc6f53dac..000000000 Binary files a/helm/interface/xaland-java/sped.class and /dev/null differ diff --git a/helm/interface/xaland-java/sped.java b/helm/interface/xaland-java/sped.java deleted file mode 100644 index 9d96610d4..000000000 --- a/helm/interface/xaland-java/sped.java +++ /dev/null @@ -1,28 +0,0 @@ -import java.net.*; - -public class sped { - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException - { - String input = argv[0]; - String out1 = argv[1]; - String out2 = argv[2]; - - String sent = input + " " + out1 + " " + out2; - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket = new DatagramSocket(); - - int strlen = sent.length(); - byte buf[] = new byte[strlen]; - sent.getBytes(0,strlen,buf,0); - DatagramPacket packet = new DatagramPacket(buf,strlen,address,12345); - - socket.send(packet); - - - /* Wait for answer (or forever ;-) */ - DatagramSocket socket2 = new DatagramSocket(12346); - DatagramPacket packet2 = new DatagramPacket(new byte[1],1); - socket2.receive(packet2); - } -} diff --git a/helm/interface/xaland-java/xaland.class b/helm/interface/xaland-java/xaland.class deleted file mode 100644 index 6871fda4b..000000000 Binary files a/helm/interface/xaland-java/xaland.class and /dev/null differ diff --git a/helm/interface/xaland-java/xaland.java b/helm/interface/xaland-java/xaland.java deleted file mode 100644 index 1b9312c46..000000000 --- a/helm/interface/xaland-java/xaland.java +++ /dev/null @@ -1,91 +0,0 @@ -import org.apache.xalan.xslt.*; -import java.net.*; -import java.io.*; - -public class xaland { -/* - public static void Transform(StylesheetRoot style, String xmlSourceURL, String OutputURL) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - XSLTInputSource xmlSource = new XSLTInputSource (xmlSourceURL); - XSLTResultTarget xmlResult = new XSLTResultTarget (OutputURL); - style.process(xmlSource, xmlResult); - } -*/ - - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - int port = Integer.parseInt(argv[0]); - int port2 = Integer.parseInt(argv[1]); - String xsl1 = argv[2]; - String xsl2 = argv[3]; - String theory_xsl1 = argv[4]; - String theory_xsl2 = argv[5]; - - XSLTProcessor theory_processor = - XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison()); - StylesheetRoot theory_style1 = - theory_processor.processStylesheet(theory_xsl1); - theory_processor.reset(); - StylesheetRoot theory_style2 = - theory_processor.processStylesheet(theory_xsl2); - theory_processor.setStylesheet(theory_style2); - - XSLTProcessor processor = - XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison()); - StylesheetRoot style1 = processor.processStylesheet(xsl1); - processor.reset(); - StylesheetRoot style2 = processor.processStylesheet(xsl2); - processor.setStylesheet(style2); - - DatagramSocket socket = new DatagramSocket(port); - - System.out.println("Demon activated on input port " + port + - " and output port " + port2); - while(true) { - System.out.print("Ready..."); - - /* Warning: the packet must be a fresh one! */ - DatagramPacket packet = new DatagramPacket(new byte[1024],1024); - socket.receive(packet); - byte data[] = packet.getData(); - int datalen = packet.getLength(); - String received = new String(data,0,datalen); - - int first = received.indexOf(' '); - int last = received.lastIndexOf(' '); - String mode = received.substring(0,first); - String input = received.substring(first+1,last); - String output = received.substring(last+1); - - System.out.println("request received! Parameters are"); - System.out.println("Mode: " + mode + " "); - System.out.println("Input file: \"" + input + "\""); - System.out.println("Output file: \"" + output + "\"\n"); - - if ((new File(output)).exists()) { - System.out.println("Using cached version\n"); - } else { - FileOutputStream fout = new FileOutputStream(output); - if (mode.equals("cic")) { - processor.setDocumentHandler(style2.getSAXSerializer(fout)); - XSLTResultTarget content = new XSLTResultTarget(processor); - style1.process(new XSLTInputSource(input), content); - } else if (mode.equals("theory")) { - theory_processor.setDocumentHandler( - theory_style2.getSAXSerializer(fout)); - XSLTResultTarget content = - new XSLTResultTarget(theory_processor); - theory_style1.process(new XSLTInputSource(input), content); - } - } - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket2 = new DatagramSocket(); - - byte buf[] = new byte[0]; - DatagramPacket packet2 = new DatagramPacket(buf,0,address,port2); - - socket2.send(packet2); - } - } -} diff --git a/helm/interface/xaland-java/xaland.java.prima_del_loro_baco b/helm/interface/xaland-java/xaland.java.prima_del_loro_baco deleted file mode 100644 index b46ffa6aa..000000000 --- a/helm/interface/xaland-java/xaland.java.prima_del_loro_baco +++ /dev/null @@ -1,85 +0,0 @@ -import org.apache.xalan.xslt.*; -import java.net.*; -import java.io.*; - -public class xaland { - public static void Transform(StylesheetRoot style, String xmlSourceURL, String OutputURL) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - XSLTInputSource xmlSource = new XSLTInputSource (xmlSourceURL); - XSLTResultTarget xmlResult = new XSLTResultTarget (OutputURL); - style.process(xmlSource, xmlResult); - } - - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - int port = Integer.parseInt(argv[0]); - int port2 = Integer.parseInt(argv[1]); - String xsl1 = argv[2]; - String xsl2 = argv[3]; - String theory_xsl1 = argv[4]; - String theory_xsl2 = argv[5]; - - XSLTProcessor theory_processor = XSLTProcessorFactory.getProcessor(); - StylesheetRoot theory_style1 = - theory_processor.processStylesheet(theory_xsl1); - StylesheetRoot theory_style2 = - theory_processor.processStylesheet(theory_xsl2); - theory_processor.setStylesheet(theory_style2); - - XSLTProcessor processor = XSLTProcessorFactory.getProcessor(); - StylesheetRoot style1 = processor.processStylesheet(xsl1); - StylesheetRoot style2 = processor.processStylesheet(xsl2); - processor.setStylesheet(style2); - - DatagramSocket socket = new DatagramSocket(port); - - System.out.println("Demon activated on input port " + port + - " and output port " + port2); - while(true) { - System.out.print("Ready..."); - - /* Warning: the packet must be a fresh one! */ - DatagramPacket packet = new DatagramPacket(new byte[1024],1024); - socket.receive(packet); - byte data[] = packet.getData(); - int datalen = packet.getLength(); - String received = new String(data,0,datalen); - - int first = received.indexOf(' '); - int last = received.lastIndexOf(' '); - String mode = received.substring(0,first); - String input = received.substring(first+1,last); - String output = received.substring(last+1); - - System.out.println("request received! Parameters are"); - System.out.println("Mode: " + mode + " "); - System.out.println("Input file: \"" + input + "\""); - System.out.println("Output file: \"" + output + "\"\n"); - - if ((new File(output)).exists()) { - System.out.println("Using cached version\n"); - } else { - FileOutputStream fout = new FileOutputStream(output); - if (mode.equals("cic")) { - processor.setDocumentHandler(style2.getSAXSerializer(fout)); - XSLTResultTarget content = new XSLTResultTarget(processor); - style1.process(new XSLTInputSource(input), content); - } else if (mode.equals("theory")) { - theory_processor.setDocumentHandler( - theory_style2.getSAXSerializer(fout)); - XSLTResultTarget content = - new XSLTResultTarget(theory_processor); - theory_style1.process(new XSLTInputSource(input), content); - } - } - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket2 = new DatagramSocket(); - - byte buf[] = new byte[0]; - DatagramPacket packet2 = new DatagramPacket(buf,0,address,port2); - - socket2.send(packet2); - } - } -} diff --git a/helm/interface/xaland-java/xaland.java.prima_del_loro_baco_ma_dopo_i_reset b/helm/interface/xaland-java/xaland.java.prima_del_loro_baco_ma_dopo_i_reset deleted file mode 100644 index 1467cdd2e..000000000 --- a/helm/interface/xaland-java/xaland.java.prima_del_loro_baco_ma_dopo_i_reset +++ /dev/null @@ -1,87 +0,0 @@ -import org.apache.xalan.xslt.*; -import java.net.*; -import java.io.*; - -public class xaland { - public static void Transform(StylesheetRoot style, String xmlSourceURL, String OutputURL) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - XSLTInputSource xmlSource = new XSLTInputSource (xmlSourceURL); - XSLTResultTarget xmlResult = new XSLTResultTarget (OutputURL); - style.process(xmlSource, xmlResult); - } - - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - int port = Integer.parseInt(argv[0]); - int port2 = Integer.parseInt(argv[1]); - String xsl1 = argv[2]; - String xsl2 = argv[3]; - String theory_xsl1 = argv[4]; - String theory_xsl2 = argv[5]; - - XSLTProcessor theory_processor = XSLTProcessorFactory.getProcessor(); - StylesheetRoot theory_style1 = - theory_processor.processStylesheet(theory_xsl1); - theory_processor.reset(); - StylesheetRoot theory_style2 = - theory_processor.processStylesheet(theory_xsl2); - theory_processor.setStylesheet(theory_style2); - - XSLTProcessor processor = XSLTProcessorFactory.getProcessor(); - StylesheetRoot style1 = processor.processStylesheet(xsl1); - processor.reset(); - StylesheetRoot style2 = processor.processStylesheet(xsl2); - processor.setStylesheet(style2); - - DatagramSocket socket = new DatagramSocket(port); - - System.out.println("Demon activated on input port " + port + - " and output port " + port2); - while(true) { - System.out.print("Ready..."); - - /* Warning: the packet must be a fresh one! */ - DatagramPacket packet = new DatagramPacket(new byte[1024],1024); - socket.receive(packet); - byte data[] = packet.getData(); - int datalen = packet.getLength(); - String received = new String(data,0,datalen); - - int first = received.indexOf(' '); - int last = received.lastIndexOf(' '); - String mode = received.substring(0,first); - String input = received.substring(first+1,last); - String output = received.substring(last+1); - - System.out.println("request received! Parameters are"); - System.out.println("Mode: " + mode + " "); - System.out.println("Input file: \"" + input + "\""); - System.out.println("Output file: \"" + output + "\"\n"); - - if ((new File(output)).exists()) { - System.out.println("Using cached version\n"); - } else { - FileOutputStream fout = new FileOutputStream(output); - if (mode.equals("cic")) { - processor.setDocumentHandler(style2.getSAXSerializer(fout)); - XSLTResultTarget content = new XSLTResultTarget(processor); - style1.process(new XSLTInputSource(input), content); - } else if (mode.equals("theory")) { - theory_processor.setDocumentHandler( - theory_style2.getSAXSerializer(fout)); - XSLTResultTarget content = - new XSLTResultTarget(theory_processor); - theory_style1.process(new XSLTInputSource(input), content); - } - } - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket2 = new DatagramSocket(); - - byte buf[] = new byte[0]; - DatagramPacket packet2 = new DatagramPacket(buf,0,address,port2); - - socket2.send(packet2); - } - } -} diff --git a/helm/interface/xaland-java2/xaland2.class b/helm/interface/xaland-java2/xaland2.class deleted file mode 100644 index 95b42c712..000000000 Binary files a/helm/interface/xaland-java2/xaland2.class and /dev/null differ diff --git a/helm/interface/xaland-java2/xaland2.java b/helm/interface/xaland-java2/xaland2.java deleted file mode 100644 index 9d91d37fb..000000000 --- a/helm/interface/xaland-java2/xaland2.java +++ /dev/null @@ -1,134 +0,0 @@ -import java.net.*; -import java.io.*; - -// Imported TraX classes -import org.apache.trax.Processor; -import org.apache.trax.Templates; -import org.apache.trax.Transformer; -import org.apache.trax.Result; -import org.apache.trax.ProcessorException; -import org.apache.trax.ProcessorFactoryException; -import org.apache.trax.TransformException; - -// Imported SAX classes -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.Parser; -import org.xml.sax.helpers.ParserAdapter; -import org.xml.sax.helpers.XMLReaderFactory; -import org.xml.sax.XMLReader; -import org.xml.sax.ContentHandler; -import org.xml.sax.ext.LexicalHandler; - -// Imported DOM classes -import org.w3c.dom.Node; - -// Imported Serializer classes -import org.apache.serialize.OutputFormat; -import org.apache.serialize.Serializer; -import org.apache.serialize.SerializerFactory; - -// Imported JAVA API for XML Parsing 1.0 classes -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - - -public class xaland2 { - public static void main(String argv[]) throws IOException, MalformedURLException, SAXException, ParserConfigurationException - { - int port = Integer.parseInt(argv[0]); - int port2 = Integer.parseInt(argv[1]); - String xsl1 = argv[2]; - String xsl2 = argv[3]; - String theory_xsl1 = argv[4]; - String theory_xsl2 = argv[5]; - - Processor theory_processor = Processor.newInstance("xslt"); - Templates theory_style1 = theory_processor.process(new InputSource(theory_xsl1)); - Transformer theory_transformer1 = theory_style1.newTransformer(); - - Templates theory_style2 = theory_processor.process(new InputSource(theory_xsl2)); - Transformer theory_transformer2 = theory_style2.newTransformer(); - - - Processor processor = Processor.newInstance("xslt"); - Templates style1 = processor.process(new InputSource(xsl1)); - Transformer transformer1 = style1.newTransformer(); - - Templates style2 = processor.process(new InputSource(xsl2)); - Transformer transformer2 = style2.newTransformer(); - - - DatagramSocket socket = new DatagramSocket(port); - - System.out.println("Demon activated on input port " + port + - " and output port " + port2); - while(true) { - System.out.print("Ready..."); - - /* Warning: the packet must be a fresh one! */ - DatagramPacket packet = new DatagramPacket(new byte[1024],1024); - socket.receive(packet); - byte data[] = packet.getData(); - int datalen = packet.getLength(); - String received = new String(data,0,datalen); - - int first = received.indexOf(' '); - int last = received.lastIndexOf(' '); - String mode = received.substring(0,first); - String input = received.substring(first+1,last); - String output = received.substring(last+1); - - System.out.println("request received! Parameters are"); - System.out.println("Mode: " + mode + " "); - System.out.println("Input file: \"" + input + "\""); - System.out.println("Output file: \"" + output + "\"\n"); - - if ((new File(output)).exists()) { - System.out.println("Using cached version\n"); - } else { - FileOutputStream fout = new FileOutputStream(output); - if (mode.equals("cic")) { - XMLReader reader = XMLReaderFactory.createXMLReader(); - ContentHandler chandler = transformer1.getInputContentHandler(); - reader.setContentHandler(chandler); - if (chandler instanceof LexicalHandler) - reader.setProperty("http://xml.org/sax/properties/lexical-handler", chandler); - else - reader.setProperty("http://xml.org/sax/properties/lexical-handler", null); - - transformer1.setContentHandler(transformer2.getInputContentHandler()); - Serializer serializer = SerializerFactory.getSerializer("xml"); - serializer.setOutputStream(fout); - transformer2.setContentHandler(serializer.asContentHandler()); - - reader.parse(input); - } else if (mode.equals("theory")) { - XMLReader reader = XMLReaderFactory.createXMLReader(); - ContentHandler chandler = theory_transformer1.getInputContentHandler(); - reader.setContentHandler(chandler); - if (chandler instanceof LexicalHandler) - reader.setProperty("http://xml.org/sax/properties/lexical-handler", chandler); - else - reader.setProperty("http://xml.org/sax/properties/lexical-handler", null); - - theory_transformer1.setContentHandler(theory_transformer2.getInputContentHandler()); - Serializer serializer = SerializerFactory.getSerializer("xml"); - serializer.setOutputStream(fout); - theory_transformer2.setContentHandler(serializer.asContentHandler()); - - reader.parse(input); - } - } - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket2 = new DatagramSocket(); - - byte buf[] = new byte[0]; - DatagramPacket packet2 = new DatagramPacket(buf,0,address,port2); - - socket2.send(packet2); - } - } -} diff --git a/helm/interface/xaland.class b/helm/interface/xaland.class deleted file mode 100644 index 6871fda4b..000000000 Binary files a/helm/interface/xaland.class and /dev/null differ diff --git a/helm/interface/xaland2.class b/helm/interface/xaland2.class deleted file mode 100644 index 95b42c712..000000000 Binary files a/helm/interface/xaland2.class and /dev/null differ