All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.enhydra.wireless.wml.dom.xerces.WMLDOMImplementationImpl Maven / Gradle / Ivy

The newest version!
/*
 * Enhydra Java Application Server Project
 * 
 * The contents of this file are subject to the Enhydra Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License on
 * the Enhydra web site ( http://www.enhydra.org/ ).
 * 
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 
 * the License for the specific terms governing rights and limitations
 * under the License.
 * 
 * The Initial Developer of the Original Code is DigitalSesame
 * Portions created by DigitalSesame are Copyright (C) 1997-2000 DigitalSesame
 * All Rights Reserved.
 * 
 * Contributor(s):
 * 
 * $Id: WMLDOMImplementationImpl.java,v 1.2 2005/01/26 08:28:45 jkjome Exp $
 */
package org.enhydra.wireless.wml.dom.xerces;

import org.enhydra.apache.xerces.dom.DOMImplementationImpl;
import org.enhydra.apache.xerces.dom.DocumentImpl;
import org.enhydra.wireless.wml.dom.WMLDOMImplementation;
import org.w3c.dom.DOMException;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;

public class WMLDOMImplementationImpl extends DOMImplementationImpl implements WMLDOMImplementation {

    static DOMImplementationImpl singleton = new WMLDOMImplementationImpl();

    /** NON-DOM: Obtain and return the single shared object */
    public static DOMImplementation getDOMImplementation() {
        return singleton;
    }  

    /**
     * @see org.w3c.dom.DOMImplementation
     */
    public Document createDocument(String namespaceURI, 
				   String qualifiedName, 
				   DocumentType doctype) throws DOMException {
        DocumentImpl doc = new WMLDocumentImpl(doctype);
        Element e = doc.createElementNS(namespaceURI, qualifiedName);
        doc.appendChild(e);
        return doc;
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy