Class LSPXMLEntityManager

  • All Implemented Interfaces:
    org.apache.xerces.xni.parser.XMLComponent, org.apache.xerces.xni.parser.XMLEntityResolver

    public class LSPXMLEntityManager
    extends org.apache.xerces.impl.XMLEntityManager
    Custom XML entity manager which return an empty string when a DOCTYPE SYSTEM or ENTITY SYSTEM doesn't exist to:
    • avoid breaking the XML syntax validation when XML contains a DOCTYPE/ENTITY SYSTEM which doesn't exist
    • report the error DOCTYPE/ENTITY SYSTEM which doesn't exist in the proper range of SYSTEM
    Author:
    Angelo ZERR
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.xerces.impl.XMLEntityManager

        org.apache.xerces.impl.XMLEntityManager.Entity, org.apache.xerces.impl.XMLEntityManager.ExternalEntity, org.apache.xerces.impl.XMLEntityManager.InternalEntity, org.apache.xerces.impl.XMLEntityManager.RewindableInputStream, org.apache.xerces.impl.XMLEntityManager.ScannedEntity
    • Field Summary

      • Fields inherited from class org.apache.xerces.impl.XMLEntityManager

        ALLOW_JAVA_ENCODINGS, BUFFER_SIZE, DEFAULT_BUFFER_SIZE, DEFAULT_INTERNAL_BUFFER_SIZE, DEFAULT_XMLDECL_BUFFER_SIZE, ENTITY_RESOLVER, ERROR_REPORTER, EXTERNAL_GENERAL_ENTITIES, EXTERNAL_PARAMETER_ENTITIES, fAllowJavaEncodings, fBufferSize, fCurrentEntity, fDeclaredEntities, fEntities, fEntityExpansionCount, fEntityExpansionLimit, fEntityHandler, fEntityResolver, fEntityScanner, fEntityStack, fErrorReporter, fExternalGeneralEntities, fExternalParameterEntities, fHasPEReferences, fInExternalSubset, fReaderStack, fSecurityManager, fStandalone, fStrictURI, fSymbolTable, fValidation, fValidationManager, fWarnDuplicateEntityDef, fXML10EntityScanner, fXML11EntityScanner, PARSER_SETTINGS, SECURITY_MANAGER, STANDARD_URI_CONFORMANT, SYMBOL_TABLE, VALIDATION, VALIDATION_MANAGER, WARN_ON_DUPLICATE_ENTITYDEF
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()  
      org.apache.xerces.xni.parser.XMLInputSource resolveEntity​(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)  
      void setEntityResolver​(org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)  
      void setResolveExternalEntities​(boolean resolveExternalEntities)  
      void setSecurityManager​(org.apache.xerces.util.SecurityManager securityManager)  
      String setupCurrentEntity​(String name, org.apache.xerces.xni.parser.XMLInputSource xmlInputSource, boolean literal, boolean isExternal)  
      • Methods inherited from class org.apache.xerces.impl.XMLEntityManager

        absolutizeAgainstUserDir, addExternalEntity, addInternalEntity, addInternalEntity, addUnparsedEntity, closeReaders, createOutputStream, createReader, endExternalSubset, expandSystemId, fixURI, getCurrentEntity, getCurrentResourceIdentifier, getEncodingInfo, getEntityScanner, getFeatureDefault, getParamEntityRefCount, getPropertyDefault, getRecognizedFeatures, getRecognizedProperties, isDeclaredEntity, isEntityDeclInExternalSubset, isExternalEntity, isStandalone, isUnparsedEntity, reset, reset, setEntityHandler, setFeature, setProperty, setScannerVersion, setStandalone, startDocumentEntity, startDTDEntity, startEntity, startEntity, startExternalSubset
    • Method Detail

      • resolveEntity

        public org.apache.xerces.xni.parser.XMLInputSource resolveEntity​(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)
                                                                  throws IOException,
                                                                         org.apache.xerces.xni.XNIException
        Specified by:
        resolveEntity in interface org.apache.xerces.xni.parser.XMLEntityResolver
        Overrides:
        resolveEntity in class org.apache.xerces.impl.XMLEntityManager
        Throws:
        IOException
        org.apache.xerces.xni.XNIException
      • setupCurrentEntity

        public String setupCurrentEntity​(String name,
                                         org.apache.xerces.xni.parser.XMLInputSource xmlInputSource,
                                         boolean literal,
                                         boolean isExternal)
                                  throws IOException,
                                         org.apache.xerces.xni.XNIException
        Overrides:
        setupCurrentEntity in class org.apache.xerces.impl.XMLEntityManager
        Throws:
        IOException
        org.apache.xerces.xni.XNIException
      • setResolveExternalEntities

        public void setResolveExternalEntities​(boolean resolveExternalEntities)
      • setSecurityManager

        public void setSecurityManager​(org.apache.xerces.util.SecurityManager securityManager)
      • setEntityResolver

        public void setEntityResolver​(org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
      • dispose

        public void dispose()