Class XMLResolverImpl

    • Constructor Detail

      • XMLResolverImpl

        public XMLResolverImpl()
        Equivalent to XMLResolverImpl(null).

        Useful when the list of XML catalog files is specified by the value of system property xml.catalog.files.

      • XMLResolverImpl

        public XMLResolverImpl​(URL[] urls)
        Constructs an XMLResolverImpl.
        Parameters:
        urls - the URLs of the XML catalog files to be used by this XML resolver. If null, this list is specified by the value of system property xml.catalog.files, if any.
    • Method Detail

      • addRewriteURIEntry

        public void addRewriteURIEntry​(String uriStartString,
                                       String rewritePrefix)
        Description copied from interface: XMLResolver
        Adds specified <rewriteURI> entry to the XML catalogs being used by this resolver.
        Specified by:
        addRewriteURIEntry in interface XMLResolver
        Parameters:
        uriStartString - prefix of an URI
        rewritePrefix - new prefix for URIs starting with uriStartString. Must be the start of an absolute URL in order to be able to use this entry to resolve URIs.
      • getResolvedEntity

        public String getResolvedEntity​(String publicId,
                                        String systemId)
        Description copied from interface: XMLResolver
        Resolves specified the public identifier/system identifier of an entity. If a mapping is found in the XML catalogs, this mapping is returned. Otherwise returns null.
        Specified by:
        getResolvedEntity in interface XMLResolver
        Parameters:
        publicId - the public identifier of the entity. May be null.
        systemId - the system identifier of the entity. Not null.
        Returns:
        found mapping (a URI reference) or null
      • resolveURI

        public String resolveURI​(String uri)
        Description copied from interface: XMLResolver
        Resolves specified URI. If a mapping is found in the XML catalogs, this mapping is returned. Otherwise returns null.
        Specified by:
        resolveURI in interface XMLResolver
        Parameters:
        uri - URI for which a mapping is to be found. This URI may have a fragment.
        Returns:
        found mapping (a URI reference) or null