This commit was manufactured by cvs2svn to create branch 'gomp-branch'.
[official-gcc.git] / libjava / org / w3c / dom / DOMImplementation.java
blobb11d715843137a7f6afbf088c93b7d4441481d9f
1 /*
2 * Copyright (c) 2000 World Wide Web Consortium,
3 * (Massachusetts Institute of Technology, Institut National de
4 * Recherche en Informatique et en Automatique, Keio University). All
5 * Rights Reserved. This program is distributed under the W3C's Software
6 * Intellectual Property License. This program is distributed in the
7 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 * PURPOSE.
10 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
13 package org.w3c.dom;
15 /**
16 * The <code>DOMImplementation</code> interface provides a number of methods
17 * for performing operations that are independent of any particular instance
18 * of the document object model.
19 * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
21 public interface DOMImplementation {
22 /**
23 * Test if the DOM implementation implements a specific feature.
24 * @param featureThe name of the feature to test (case-insensitive). The
25 * values used by DOM features are defined throughout the DOM Level 2
26 * specifications and listed in the section. The name must be an XML
27 * name. To avoid possible conflicts, as a convention, names referring
28 * to features defined outside the DOM specification should be made
29 * unique by reversing the name of the Internet domain name of the
30 * person (or the organization that the person belongs to) who defines
31 * the feature, component by component, and using this as a prefix.
32 * For instance, the W3C SVG Working Group defines the feature
33 * "org.w3c.dom.svg".
34 * @param versionThis is the version number of the feature to test. In
35 * Level 2, the string can be either "2.0" or "1.0". If the version is
36 * not specified, supporting any version of the feature causes the
37 * method to return <code>true</code>.
38 * @return <code>true</code> if the feature is implemented in the
39 * specified version, <code>false</code> otherwise.
41 public boolean hasFeature(String feature,
42 String version);
44 /**
45 * Creates an empty <code>DocumentType</code> node. Entity declarations
46 * and notations are not made available. Entity reference expansions and
47 * default attribute additions do not occur. It is expected that a
48 * future version of the DOM will provide a way for populating a
49 * <code>DocumentType</code>.
50 * <br>HTML-only DOM implementations do not need to implement this method.
51 * @param qualifiedNameThe qualified name of the document type to be
52 * created.
53 * @param publicIdThe external subset public identifier.
54 * @param systemIdThe external subset system identifier.
55 * @return A new <code>DocumentType</code> node with
56 * <code>Node.ownerDocument</code> set to <code>null</code>.
57 * @exception DOMException
58 * INVALID_CHARACTER_ERR: Raised if the specified qualified name
59 * contains an illegal character.
60 * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
61 * malformed.
62 * @since DOM Level 2
64 public DocumentType createDocumentType(String qualifiedName,
65 String publicId,
66 String systemId)
67 throws DOMException;
69 /**
70 * Creates an XML <code>Document</code> object of the specified type with
71 * its document element. HTML-only DOM implementations do not need to
72 * implement this method.
73 * @param namespaceURIThe namespace URI of the document element to create.
74 * @param qualifiedNameThe qualified name of the document element to be
75 * created.
76 * @param doctypeThe type of document to be created or <code>null</code>.
77 * When <code>doctype</code> is not <code>null</code>, its
78 * <code>Node.ownerDocument</code> attribute is set to the document
79 * being created.
80 * @return A new <code>Document</code> object.
81 * @exception DOMException
82 * INVALID_CHARACTER_ERR: Raised if the specified qualified name
83 * contains an illegal character.
84 * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
85 * malformed, if the <code>qualifiedName</code> has a prefix and the
86 * <code>namespaceURI</code> is <code>null</code>, or if the
87 * <code>qualifiedName</code> has a prefix that is "xml" and the
88 * <code>namespaceURI</code> is different from "
89 * http://www.w3.org/XML/1998/namespace" .
90 * <br>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
91 * been used with a different document or was created from a different
92 * implementation.
93 * @since DOM Level 2
95 public Document createDocument(String namespaceURI,
96 String qualifiedName,
97 DocumentType doctype)
98 throws DOMException;