You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by rm...@corp.super11.net on 2000/08/25 16:25:38 UTC

Supressing warning output

Hi everybody,

     I work in a publisher software that produces XML documents (and uses
Coccon - with Xalan and Xerces - to translate them to HTML). I was doing
connections to a machine running Coccon, but I started to use Xalan's
classes to generate the HTML's "on the fly". The code I show below works
fine, but I have the warning message: "xsl stylesheet requires a 'version'
attribute!". The XSLs used don't have the version attribute, but since we
have hundreads of them, I'd like to know if there is some way to supress
this warning output... :-)

     XSLTProcessor processor = null;
     MyProblemListener problem = null;
     StylesheetRoot style = null;
     ...
     processor = XSLTProcessorFactory.getProcessor();
     problem = new MyProblemListener();
     processor.setProblemListener(problem);
     ...
     style = processor.processStylesheet(new XSLTInputSource(Xsl));
     style.setOutputMethod("html");
     style.process(new XSLTInputSource(Xml), new XSLTResultTarget(file));
     processor.reset();

     I implemeneted my own ProblemListener, that writes in a log file and
returns "classification == ERROR" (which means I don't raise an exception
when I have a warning). Does it have something to do with the problem? I'm
using the Java implementation of xalan_1_0_1 and xerces_1_0_3.

     Thanks in advance for any help.
     Rodrigo