286N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 286N/A * This code is free software; you can redistribute it and/or modify it 286N/A * under the terms of the GNU General Public License version 2 only, as 286N/A * published by the Free Software Foundation. Oracle designates this 286N/A * particular file as subject to the "Classpath" exception as provided 286N/A * by Oracle in the LICENSE file that accompanied this code. 286N/A * This code is distributed in the hope that it will be useful, but WITHOUT 286N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 286N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 286N/A * version 2 for more details (a copy is included in the LICENSE file that 286N/A * accompanied this code). 286N/A * You should have received a copy of the GNU General Public License version 286N/A * 2 along with this work; if not, write to the Free Software Foundation, 286N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 286N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 286N/A * or visit www.oracle.com if you need additional information or have any 286N/A * This file is available under and governed by the GNU General Public 286N/A * License version 2 only, as published by the Free Software Foundation. 286N/A * However, the following notice accompanied the original version of this 286N/A * file and, per its terms, should not be removed: 286N/A * Copyright (c) 2004 World Wide Web Consortium, 286N/A * (Massachusetts Institute of Technology, European Research Consortium for 286N/A * Informatics and Mathematics, Keio University). All Rights Reserved. This 286N/A * work is distributed under the W3C(r) Software License [1] in the hope that 286N/A * it will be useful, but WITHOUT ANY WARRANTY; without even the implied 286N/A * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 286N/A * A factory that enables applications to obtain instances of 286N/A * <code>DOMImplementation</code>. 286N/A * <pre class='example'> 286N/A * // get an instance of the DOMImplementation registry 286N/A * DOMImplementationRegistry registry = 286N/A * DOMImplementationRegistry.newInstance(); 286N/A * // get a DOM implementation the Level 3 XML module 286N/A * DOMImplementation domImpl = 286N/A * registry.getDOMImplementation("XML 3.0"); 286N/A * This provides an application with an implementation-independent starting 286N/A * point. DOM implementations may modify this class to meet new security 286N/A * standards or to provide *additional* fallbacks for the list of 286N/A * DOMImplementationSources. 286N/A * @see DOMImplementation 286N/A * @see DOMImplementationSource 286N/A * The system property to specify the 286N/A * DOMImplementationSource class names. 286N/A "org.w3c.dom.DOMImplementationSourceList";
286N/A * Default columns per line. 286N/A * The list of DOMImplementationSources. 286N/A "com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl";
524N/A "com.sun.org.apache.xerces.internal.dom";
286N/A * @param srcs Vector List of DOMImplementationSources 286N/A * Obtain a new instance of a <code>DOMImplementationRegistry</code>. 286N/A * The <code>DOMImplementationRegistry</code> is initialized by the 286N/A * application or the implementation, depending on the context, by 286N/A * first checking the value of the Java system property 286N/A * <code>org.w3c.dom.DOMImplementationSourceList</code> and 286N/A * the service provider whose contents are at 286N/A * The value of this property is a white-space separated list of 286N/A * names of availables classes implementing the 286N/A * <code>DOMImplementationSource</code> interface. Each class listed 286N/A * in the class name list is instantiated and any exceptions 286N/A * encountered are thrown to the application. 286N/A * @return an initialized instance of DOMImplementationRegistry 286N/A * @throws ClassNotFoundException 286N/A * If any specified class can not be found 286N/A * @throws InstantiationException 286N/A * If any specified class is an interface or abstract class 286N/A * @throws IllegalAccessException 286N/A * If the default constructor of a specified class is not accessible 286N/A * @throws ClassCastException 286N/A * If any specified class does not implement 286N/A * <code>DOMImplementationSource</code> 286N/A // fetch system property: 286N/A // if property is not specified then use contents of 286N/A // DOM Implementations can modify here to add *additional* fallback 286N/A // mechanisms to access a list of default DOMImplementationSources. 286N/A //fall back to JAXP implementation class com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl 524N/A // make sure we have access to restricted packages 286N/A * Return the first implementation that has the desired 286N/A * features, or <code>null</code> if none is found. 286N/A * A string that specifies which features are required. This is 286N/A * a space separated list in which each feature is specified by 286N/A * its name optionally followed by a space and a version number. 286N/A * This is something like: "XML 1.0 Traversal +Events 2.0" 286N/A * @return An implementation that has the desired features, 286N/A * or <code>null</code> if none found. 286N/A * Return a list of implementations that support the 286N/A * A string that specifies which features are required. This is 286N/A * a space separated list in which each feature is specified by 286N/A * its name optionally followed by a space and a version number. 286N/A * This is something like: "XML 1.0 Traversal +Events 2.0" 286N/A * @return A list of DOMImplementations that support the desired features. 286N/A * Register an implementation. 286N/A * @param s The source to be registered, may not be <code>null</code> 286N/A * @return A class loader, possibly <code>null</code> 286N/A // Assume that the DOM application is in a JRE 1.1, use the 286N/A * This method attempts to return the first line of the resource 286N/A * from the provided ClassLoader. 286N/A * @param classLoader classLoader, may not be <code>null</code>. 286N/A * @return first line of resource, or <code>null</code> 286N/A // try to find services in CLASSPATH 286N/A * A simple JRE (Java Runtime Environment) 1.1 test 286N/A * @return <code>true</code> if JRE 1.1 286N/A // java.security.AccessController existed since 1.2 so, if no 286N/A // exception was thrown, the DOM application is running in a JRE 286N/A * This method returns the ContextClassLoader or <code>null</code> if 286N/A * @return The Context Classloader 286N/A * This method returns the system property indicated by the specified name 286N/A * after checking access control privileges. For a JRE 1.1, this check is 286N/A * @param name the name of the system property 286N/A * @return the system property 286N/A * This method returns an Inputstream for the reading resource 286N/A * access control privileges. For a JRE 1.1, this check is not done. 286N/A * @param classLoader classLoader 286N/A * @param name the resource 286N/A * @return an Inputstream for the resource specified