[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[Announce] Koala XML activities

  • From: "Philippe Le Hégaret" <Philippe.Le_Hegaret@s...>
  • To: "XML Developers' List" <xml-dev@i...>
  • Date: Tue, 22 Sep 1998 10:28:09 +0200

koala string
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.