[Announce] Koala XML activities

Philippe Le Hˇgaret (Philippe.Le_Hegaret@sophia.inria.fr)
Tue, 22 Sep 1998 10:28:09 +0200


This is a multi-part message in MIME format.
--------------53B4D98B3006B2650D2D0BF0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello,

I am please to announce a new XML service on the Web.
http://koala.inria.fr:8080/

The goal of the Koala XML services is to show our
current work on XML.
Current services are :

- an XML validation service. This is my own work.
the current version has some troubles with entities.

- an XSL engine by Jeremy Calles.
the current version doesn't support formatting objects
yet. This web service can be invoked directly by the
XSLOnline Java program (see attachment).

Hope you will find this helpful,

Jeremy Calles and Philippe Le Hegaret.
-------
Have fun with Koalas! :-)
http://www.inria.fr/koala/
--------------53B4D98B3006B2650D2D0BF0
Content-Type: text/plain; charset=us-ascii; name="XSLOnline.java"
Content-Disposition: inline; filename="XSLOnline.java"
Content-Transfer-Encoding: 7bit

import java.net.*;
import java.io.*;

/**
* This class is a little tool to invoke the XSLEngine.
*
*/
public class XSLOnline {

public static String baseURL = "http://koala.inria.fr:8080/Java/XSLEngine?";

public static void main(String[] args) {
try {
if ((!args[0].equals("-r")) || (args.length > 3)) {
throw new ArrayIndexOutOfBoundsException();
}
String command = "";
command += "XMLuri=" + args[2];
command += "&XSLuri=" + args[1];

URL url = new URL(baseURL + command);

InputStream in = openStream(url);
int i = 0;


while ((i = in.read()) != -1) {
System.err.print( (char) i );
}
} catch (ArrayIndexOutOfBoundsException e) {
System.err.println("XSLOnline v 1.0 - "
+ "jcalles@sophia.inria.fr");
System.err.println("Usage: -r xslUrl [xmlUrl]");
} catch (FileNotFoundException e) {
System.err.println("File not found: " + e.getMessage());
} catch (IOException e) {
System.err.println("I/O Error: " + e.getMessage());
} catch (Exception e) {
System.err.println("Error: ");
System.err.println(e.toString());
}
}

private static InputStream openStream(URL url) throws IOException {
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestProperty("Pragma", "no-cache"); // @@deprecated
connection.setRequestProperty("Cache-Control", "no-cache");
connection.setRequestProperty("Accept", "text/plain");
connection.setRequestProperty("User-Agent", "Koala_XSLOnline/1.0");

if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
if (connection.getResponseMessage() != null) {
throw new IOException(url + ": " +
connection.getResponseMessage());
} else {
throw new IOException(url + ": " +
connection.getResponseCode());
}
}
return connection.getInputStream();
}
}

--------------53B4D98B3006B2650D2D0BF0--