01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.xerces.jaxp.validation;
19:
20: import javax.xml.transform.dom.DOMResult;
21:
22: import org.apache.xerces.xni.XMLDocumentHandler;
23: import org.apache.xerces.xni.XNIException;
24:
25: import org.w3c.dom.CDATASection;
26: import org.w3c.dom.Comment;
27: import org.w3c.dom.DocumentType;
28: import org.w3c.dom.ProcessingInstruction;
29: import org.w3c.dom.Text;
30:
31: /**
32: * <p>An extension to XMLDocumentHandler for building DOM structures.</p>
33: *
34: * @author Michael Glavassevich, IBM
35: * @version $Id: DOMDocumentHandler.java 447235 2006-09-18 05:01:44Z mrglavas $
36: */
37: interface DOMDocumentHandler extends XMLDocumentHandler {
38:
39: /**
40: * <p>Sets the <code>DOMResult</code> object which
41: * receives the constructed DOM nodes.</p>
42: *
43: * @param result the object which receives the constructed DOM nodes
44: */
45: public void setDOMResult(DOMResult result);
46:
47: /**
48: * A document type declaration.
49: *
50: * @param node a DocumentType node
51: *
52: * @exception XNIException Thrown by handler to signal an error.
53: */
54: public void doctypeDecl(DocumentType node) throws XNIException;
55:
56: public void characters(Text node) throws XNIException;
57:
58: public void cdata(CDATASection node) throws XNIException;
59:
60: /**
61: * A comment.
62: *
63: * @param node a Comment node
64: *
65: * @exception XNIException Thrown by application to signal an error.
66: */
67: public void comment(Comment node) throws XNIException;
68:
69: /**
70: * A processing instruction. Processing instructions consist of a
71: * target name and, optionally, text data. The data is only meaningful
72: * to the application.
73: * <p>
74: * Typically, a processing instruction's data will contain a series
75: * of pseudo-attributes. These pseudo-attributes follow the form of
76: * element attributes but are <strong>not</strong> parsed or presented
77: * to the application as anything other than text. The application is
78: * responsible for parsing the data.
79: *
80: * @param node a ProcessingInstruction node
81: *
82: * @exception XNIException Thrown by handler to signal an error.
83: */
84: public void processingInstruction(ProcessingInstruction node)
85: throws XNIException;
86:
87: public void setIgnoringCharacters(boolean ignore);
88: }
|