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