FileDocCategorySizeDatePackage
XSImplementationImpl.javaAPI DocApache Xerces 3.0.14085Fri Sep 14 20:33:54 BST 2007org.apache.xerces.impl.xs

XSImplementationImpl

public class XSImplementationImpl extends org.apache.xerces.dom.CoreDOMImplementationImpl implements org.apache.xerces.xs.XSImplementation
Implements XSImplementation interface that allows one to retrieve an instance of XSLoader. This interface should be implemented on the same object that implements DOMImplementation.
xerces.internal
author
Elena Litani, IBM
version
$Id: XSImplementationImpl.java 446734 2006-09-15 20:51:23Z mrglavas $

Fields Summary
static XSImplementationImpl
singleton
Dom implementation singleton.
Constructors Summary
Methods Summary
public org.apache.xerces.xs.XSLoadercreateXSLoader(org.apache.xerces.xs.StringList versions)

    	XSLoader loader = new XSLoaderImpl();
    	if (versions == null){
			return loader;
    	}
    	for (int i=0; i<versions.getLength();i++){
    		if (!versions.item(i).equals("1.0")){
				String msg =
					DOMMessageFormatter.formatMessage(
						DOMMessageFormatter.DOM_DOMAIN,
						"FEATURE_NOT_SUPPORTED",
						new Object[] { versions.item(i) });
				throw new XSException(XSException.NOT_SUPPORTED_ERR, msg);
    		}
    	}
    	return loader;
    
public static org.w3c.dom.DOMImplementationgetDOMImplementation()
NON-DOM: Obtain and return the single shared object


    //
    // Public methods
    //

             
        
        return singleton;
    
public org.apache.xerces.xs.StringListgetRecognizedVersions()

        StringListImpl list = new StringListImpl(new String[]{"1.0"}, 1);
        return list;
    
public booleanhasFeature(java.lang.String feature, java.lang.String version)
Test if the DOM implementation supports a specific "feature" -- currently meaning language and level thereof.

param
feature The package name of the feature to test. In Level 1, supported values are "HTML" and "XML" (case-insensitive). At this writing, org.apache.xerces.dom supports only XML.
param
version The version number of the feature being tested. This is interpreted as "Version of the DOM API supported for the specified Feature", and in Level 1 should be "1.0"
return
true iff this implementation is compatable with the specified feature and version.

    	
        return (feature.equalsIgnoreCase("XS-Loader") && (version == null || version.equals("1.0")) ||
		super.hasFeature(feature, version));