35 import org.w3c.dom.ls.LSParser;
36 import org.w3c.dom.ls.DOMImplementationLS;
37 import org.w3c.dom.ls.LSInput;
38 import org.w3c.dom.ls.LSOutput;
39 import org.w3c.dom.ls.LSSerializer;
40 /**
41 * The DOMImplementation class is description of a particular
42 * implementation of the Document Object Model. As such its data is
43 * static, shared by all instances of this implementation.
44 * <P>
45 * The DOM API requires that it be a real object rather than static
46 * methods. However, there's nothing that says it can't be a singleton,
47 * so that's how I've implemented it.
48 * <P>
49 * This particular class, along with CoreDocumentImpl, supports the DOM
50 * Core and Load/Save (Experimental). Optional modules are supported by
51 * the more complete DOMImplementation class along with DocumentImpl.
52 *
53 * @xerces.internal
54 *
55 * @version $Id: CoreDOMImplementationImpl.java,v 1.6 2010-11-01 04:39:37 joehw Exp $
56 * @since PR-DOM-Level-1-19980818.
57 */
58 public class CoreDOMImplementationImpl
59 implements DOMImplementation, DOMImplementationLS {
60 //
61 // Data
62 //
63
64 // validators pool
65 private static final int SIZE = 2;
66 private RevalidationHandler validators[] = new RevalidationHandler[SIZE];
67
68 private RevalidationHandler dtdValidators[] = new RevalidationHandler[SIZE];
69 private int freeValidatorIndex = -1;
70 private int freeDTDValidatorIndex = -1;
71 private int currentSize = SIZE;
72
73 // Document and doctype counter. Used to assign order to documents and
74 // doctypes without owners, on an demand basis. Used for
75 // compareDocumentPosition
|
35 import org.w3c.dom.ls.LSParser;
36 import org.w3c.dom.ls.DOMImplementationLS;
37 import org.w3c.dom.ls.LSInput;
38 import org.w3c.dom.ls.LSOutput;
39 import org.w3c.dom.ls.LSSerializer;
40 /**
41 * The DOMImplementation class is description of a particular
42 * implementation of the Document Object Model. As such its data is
43 * static, shared by all instances of this implementation.
44 * <P>
45 * The DOM API requires that it be a real object rather than static
46 * methods. However, there's nothing that says it can't be a singleton,
47 * so that's how I've implemented it.
48 * <P>
49 * This particular class, along with CoreDocumentImpl, supports the DOM
50 * Core and Load/Save (Experimental). Optional modules are supported by
51 * the more complete DOMImplementation class along with DocumentImpl.
52 *
53 * @xerces.internal
54 *
55 * @since PR-DOM-Level-1-19980818.
56 */
57 public class CoreDOMImplementationImpl
58 implements DOMImplementation, DOMImplementationLS {
59 //
60 // Data
61 //
62
63 // validators pool
64 private static final int SIZE = 2;
65 private RevalidationHandler validators[] = new RevalidationHandler[SIZE];
66
67 private RevalidationHandler dtdValidators[] = new RevalidationHandler[SIZE];
68 private int freeValidatorIndex = -1;
69 private int freeDTDValidatorIndex = -1;
70 private int currentSize = SIZE;
71
72 // Document and doctype counter. Used to assign order to documents and
73 // doctypes without owners, on an demand basis. Used for
74 // compareDocumentPosition
|