#!/usr/bin/ruby -w

require 'xml/xslt'

xslt = XML::XSLT.new()

print "\n-------------------------------------------------\n"
print "ERROR #1 : XML XSL inverse\n"
xslt.xsl = IO::readlines( "fuzface.xml" ).join( )
xslt.xml = IO::readlines( "fuzface.xsl" ).join( )
out = xslt.serve()

print "\n-------------------------------------------------\n"
print "ERROR #2 : XSL error\n"
xslt.xml = IO::readlines( "fuzface.xml" ).join( )
xslt.xsl = "totototototot"
print xslt.xsl,"\n";
out = xslt.serve()

print "\n-------------------------------------------------\n"
print "ERROR #3 : XML error\n"
xslt.xml = "totototototot"
xslt.xsl = IO::readlines( "fuzface.xsl" ).join( )
out = xslt.serve()

print "\n-------------------------------------------------\n"
print "SUCCESS !\n"
xslt.xml = IO::readlines( "fuzface.xml" ).join( )
xslt.xsl = IO::readlines( "fuzface.xsl" ).join( )
out = xslt.serve()

