KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > dom > DOMImplementationImpl


1 package net.sf.saxon.dom;
2
3 import org.w3c.dom.DOMException JavaDoc;
4 import org.w3c.dom.DOMImplementation JavaDoc;
5 import org.w3c.dom.Document JavaDoc;
6 import org.w3c.dom.DocumentType JavaDoc;
7
8 /**
9  * A simple implementation of the DOMImplementation interface, for use when accessing
10  * Saxon tree structure using the DOM API.
11 */

12
13 class DOMImplementationImpl implements DOMImplementation JavaDoc {
14
15  /**
16  * Test if the DOM implementation implements a specific feature.
17  * @param feature The name of the feature to test (case-insensitive).
18  * @param version This is the version number of the feature to test.
19  * @return <code>true</code> if the feature is implemented in the
20  * specified version, <code>false</code> otherwise.
21  */

22
23 public boolean hasFeature(String JavaDoc feature, String JavaDoc version) {
24     return false;
25 }
26
27  /**
28  * Return the value of a specific feature.
29   * DOM level 3 method.
30  * @param feature The name of the feature to test (case-insensitive).
31  * @param version This is the version number of the feature to test.
32  * @return the value of the feature. Always null in this implementation.
33  */

34
35 public Object JavaDoc getFeature(String JavaDoc feature,
36                          String JavaDoc version) {
37     return null;
38 }
39
40
41 /**
42  * Creates an empty <code>DocumentType</code> node.
43  * @param qualifiedName The qualified name of the document type to be
44  * created.
45  * @param publicId The external subset public identifier.
46  * @param systemId The external subset system identifier.
47  * @return A new <code>DocumentType</code> node with
48  * <code>Node.ownerDocument</code> set to <code>null</code> .
49  * @exception org.w3c.dom.DOMException
50  * INVALID_CHARACTER_ERR: Raised if the specified qualified name
51  * contains an illegal character.
52  * <br> NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
53  * malformed.
54  * @since DOM Level 2
55  */

56
57 public DocumentType JavaDoc createDocumentType(String JavaDoc qualifiedName,
58                                        String JavaDoc publicId,
59                                        String JavaDoc systemId)
60                                        throws DOMException JavaDoc
61 {
62     NodeOverNodeInfo.disallowUpdate();
63     return null;
64 }
65
66 /**
67  * Creates an XML <code>Document</code> object of the specified type with
68  * its document element.
69  * @param namespaceURI The namespace URI of the document element to
70  * create.
71  * @param qualifiedName The qualified name of the document element to be
72  * created.
73  * @param doctype The type of document to be created or <code>null</code>.
74  * @return A new <code>Document</code> object.
75  * @exception org.w3c.dom.DOMException
76  * @since DOM Level 2
77  */

78 public Document JavaDoc createDocument(String JavaDoc namespaceURI,
79                                String JavaDoc qualifiedName,
80                                DocumentType JavaDoc doctype)
81                                throws DOMException JavaDoc
82 {
83     NodeOverNodeInfo.disallowUpdate();
84     return null;
85 }
86
87 }
88
89 //
90
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
91
// you may not use this file except in compliance with the License. You may obtain a copy of the
92
// License at http://www.mozilla.org/MPL/
93
//
94
// Software distributed under the License is distributed on an "AS IS" basis,
95
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
96
// See the License for the specific language governing rights and limitations under the License.
97
//
98
// The Original Code is: all this file.
99
//
100
// The Initial Developer of the Original Code is Michael H. Kay.
101
//
102
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
103
//
104
// Contributor(s): none.
105
//
106

107
Popular Tags