Package mf.org.apache.xerces.impl.dtd

Examples of mf.org.apache.xerces.impl.dtd.XMLDTDLoader

@xerces.internal @author Neil Graham, IBM @author Michael Glavassevich, IBM @version $Id: XMLDTDLoader.java 713638 2008-11-13 04:42:18Z mrglavas $

            while (freeXML11DTDLoaderIndex >= 0) {
                // return first available DTD loader
                SoftReference ref = xml11DTDLoaders[freeXML11DTDLoaderIndex];
                XMLDTDLoaderHolder holder = (XMLDTDLoaderHolder) ref.get();
                if (holder != null && holder.loader != null) {
                    XMLDTDLoader val = holder.loader;
                    holder.loader = null;
                    --freeXML11DTDLoaderIndex;
                    return val;
                }
                xml11DTDLoaders[freeXML11DTDLoaderIndex--] = null;
            }
            //MF
            return (XMLDTDLoader) (ObjectFactory
                    .newInstance(
                        "mf.org.apache.xerces.impl.dtd.XML11DTDProcessor",
                        ObjectFactory.findClassLoader(),
                        true));
        }
        // return an instance of XMLDTDLoader
        else {
            while (freeXML10DTDLoaderIndex >= 0) {
                // return first available DTD loader
                SoftReference ref = xml10DTDLoaders[freeXML10DTDLoaderIndex];
                XMLDTDLoaderHolder holder = (XMLDTDLoaderHolder) ref.get();
                if (holder != null && holder.loader != null) {
                    XMLDTDLoader val = holder.loader;
                    holder.loader = null;
                    --freeXML10DTDLoaderIndex;
                    return val;
                }
                xml10DTDLoaders[freeXML10DTDLoaderIndex--] = null;
            }
            return new XMLDTDLoader();
        }
    }
View Full Code Here


            if (elem == null) return;
            rootName = elem.getNodeName();
            if (systemId == null || systemId.length() == 0) return;
        }
       
        XMLDTDLoader loader = null;
        try {
            fValidationHandler.doctypeDecl(rootName, publicId, systemId, null);
            loader = CoreDOMImplementationImpl.singleton.getDTDLoader(xmlVersion);
            loader.setFeature(DOMConfigurationImpl.XERCES_VALIDATION, true);
            loader.setEntityResolver(fConfiguration.getEntityResolver());
            loader.setErrorHandler(fConfiguration.getErrorHandler());
            loader.loadGrammarWithContext((XMLDTDValidator) fValidationHandler, rootName,
                    publicId, systemId, baseSystemId, internalSubset);
        }
        // REVISIT: Should probably report this exception to the error handler.
        catch (IOException e) {  
        }
View Full Code Here

        // create and register missing components
        fSchemaLoader = new XMLSchemaLoader(fSymbolTable);
        fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool);

        // and set up the DTD loader too:
        fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool);
    } // <init>(SymbolTable,XMLGrammarPool, XMLComponentManager)
View Full Code Here

TOP

Related Classes of mf.org.apache.xerces.impl.dtd.XMLDTDLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.