1 package de.webman.util.xslt; 2 3 import javax.xml.transform.ErrorListener ; 4 import javax.xml.transform.TransformerException ; 5 import org.apache.log4j.Category; 6 7 13 public class XSLTErrorListener 14 implements ErrorListener 15 { 16 17 19 21 24 private static final String MESSAGE_WARNING = "Warning during XSL transformation: "; 25 26 29 private static final String MESSAGE_ERROR = "Recoverable error during XSL transformation: "; 30 31 34 private static final String MESSAGE_FATAL_ERROR = "Non-recoverable error during XSL transformation: "; 35 36 39 private static Category cat = Category.getInstance(XSLTErrorListener.class); 40 41 42 44 50 public void warning (TransformerException exception) 51 { 52 cat.warn(MESSAGE_WARNING + exception.toString(), exception); 53 } 54 55 61 public void error (TransformerException exception) 62 { 63 cat.error(MESSAGE_ERROR + exception.toString(), exception); 64 } 65 66 72 public void fatalError (TransformerException exception) 73 { 74 cat.error(MESSAGE_FATAL_ERROR + exception.toString(), exception); 75 } 76 77 } 78 | Popular Tags |