diff --git a/examples/XSLT/mangle.cpp b/examples/XSLT/mangle.cpp index b3e8d6ec..575ef00d 100755 --- a/examples/XSLT/mangle.cpp +++ b/examples/XSLT/mangle.cpp @@ -20,11 +20,10 @@ int main(int argc, const char* argv[]) return 0; } // if ... - Arabica::XSLT::StylesheetCompiler compiler; - std::ostringstream errors; - try + try { Arabica::SAX::InputSource source(argv[2]); + Arabica::XSLT::StylesheetCompiler compiler; std::unique_ptr > stylesheet = compiler.compile(source); if(stylesheet.get() == 0) { @@ -32,7 +31,7 @@ int main(int argc, const char* argv[]) return -1; } // if ... - stylesheet->set_error_output(errors); + stylesheet->set_error_output(std::cerr); Arabica::DOM::Document document = buildDOM(argv[1]); if(document == 0) @@ -47,8 +46,6 @@ int main(int argc, const char* argv[]) std::cerr << ex.what() << std::endl; } // catch - std::cerr << "\n\n" << errors.str() << std::endl; - return 0; } // main