1 package com.icl.saxon.output; 2 import com.icl.saxon.*; 3 import com.icl.saxon.om.Namespace; 5 import com.icl.saxon.om.NamePool; 6 7 import org.xml.sax.Attributes ; 8 import javax.xml.transform.TransformerException ; 10 11 import java.io.Writer ; 12 13 14 19 20 public class ErrorEmitter extends Emitter 21 { 22 25 26 public void startDocument () throws TransformerException {} 27 28 31 32 public void endDocument () throws TransformerException {} 33 34 37 38 public void startElement (int name, Attributes attributes, 39 int[] namespaces, int nscount) throws TransformerException 40 { 41 error(); 42 } 43 44 47 48 public void endElement (int name) throws TransformerException 49 { 50 error(); 51 } 52 53 54 57 58 public void characters (char[] ch, int start, int length) throws TransformerException 59 { 60 error(); 61 } 62 63 64 67 68 public void processingInstruction (String target, String data) 69 throws TransformerException 70 { 71 error(); 72 } 73 74 77 78 public void comment (char ch[], int start, int length) throws TransformerException 79 { 80 error(); 81 } 82 83 86 87 private void error() throws TransformerException { 88 throw new TransformerException ("Cannot write to result tree while executing a function"); 89 } 90 91 92 93 } 94 95 | Popular Tags |