KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > wml > dom > WMLDOMImplementationImpl


1 /*
2  * Copyright 1999,2000,2004,2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.wml.dom;
17
18 import org.apache.wml.*;
19 import org.w3c.dom.*;
20 import org.apache.xerces.dom.*;
21
22 /**
23  * @xerces.internal
24  * @version $Id: WMLDOMImplementationImpl.java,v 1.4 2005/04/17 23:34:55 mrglavas Exp $
25  * @author <a HREF="mailto:david@topware.com.tw">David Li</a>
26  */

27 public class WMLDOMImplementationImpl extends DOMImplementationImpl implements WMLDOMImplementation {
28     
29     static final DOMImplementationImpl singleton = new WMLDOMImplementationImpl();
30     
31     /** NON-DOM: Obtain and return the single shared object */
32     public static DOMImplementation getDOMImplementation() {
33         return singleton;
34     }
35     
36     /**
37      * @see org.w3c.dom.DOMImplementation
38      */

39     public Document createDocument(String JavaDoc namespaceURI,
40             String JavaDoc qualifiedName,
41             DocumentType doctype) throws DOMException {
42         DocumentImpl doc = new WMLDocumentImpl(doctype);
43         //((DocumentTypeImpl)doctype).ownerDocument = doc;
44
Element e = doc.createElementNS( namespaceURI, qualifiedName);
45         doc.appendChild(e);
46         return doc;
47     }
48 }
49
50
Popular Tags