KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > wireless > voicexml > dom > xerces > VoiceXMLDOMImplementationImpl


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Original Code is DigitalSesame
15  * Portions created by DigitalSesame are Copyright (C) 1997-2000 DigitalSesame
16  * All Rights Reserved.
17  *
18  * Contributor(s):
19  *
20  * $Id: VoiceXMLDOMImplementationImpl.java,v 1.2 2005/01/26 08:28:45 jkjome Exp $
21  */

22
23 package org.enhydra.wireless.voicexml.dom.xerces;
24
25 import org.enhydra.apache.xerces.dom.DOMImplementationImpl;
26 import org.enhydra.apache.xerces.dom.DocumentImpl;
27 import org.enhydra.wireless.voicexml.dom.VoiceXMLDOMImplementation;
28 import org.w3c.dom.DOMException JavaDoc;
29 import org.w3c.dom.DOMImplementation JavaDoc;
30 import org.w3c.dom.Document JavaDoc;
31 import org.w3c.dom.DocumentType JavaDoc;
32 import org.w3c.dom.Element JavaDoc;
33
34 public class VoiceXMLDOMImplementationImpl extends DOMImplementationImpl implements VoiceXMLDOMImplementation {
35
36     static VoiceXMLDOMImplementationImpl singleton = new VoiceXMLDOMImplementationImpl();
37
38     /** NON-DOM: Obtain and return the single shared object */
39     public static DOMImplementation getDOMImplementation() {
40         return singleton;
41     }
42
43     /**
44      * @see org.w3c.dom.DOMImplementation
45      */

46     public Document JavaDoc createDocument(String JavaDoc namespaceURI,
47                    String JavaDoc qualifiedName,
48                    DocumentType JavaDoc doctype) throws DOMException JavaDoc {
49         DocumentImpl doc = new VoiceXMLDocumentImpl(doctype);
50         Element JavaDoc e = doc.createElementNS(namespaceURI, qualifiedName);
51         doc.appendChild(e);
52         return doc;
53     }
54
55 }
56
57
Popular Tags