[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] [Announce] Koala XML activities
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/ 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@s..."); 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(); } }
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|