Class DefaultResolver

Superclasses :
xml::Resolver
Package :
xml

The default resolver resolves from a URL or the local file system.

If the system id begins with "http://", it is treated as a web URL, and loaded over the network.

If it begins with "file://", then it is treated as a local file (for an absolute path on Unix like systems, that would be three forward slashes at the start : "file:///tmp/file.dtd").

Otherwise, the system id is treated as a filename.

Source

Class summary
Methods inherited from util::Error
error(a) get_reason()
Variables inherited from util::Error
reason
Methods defined in this class
cache_uri(sys_id, val) clear_cache_uris() get_http(sys_id) get_local(sys_id) initially() resolve(external_id) resolve_impl(sys_id) set_cache_uris() set_public_mapping(pub_id, uri)
Variables defined in this class
cache_uris_flag public_mapping uri_cache

Method detail

cache_uri(sys_id, val)

Cache an individual system id (URI) to the given value.
Source

clear_cache_uris()

Turn off the caching feature.
Source

get_http(sys_id)

Source

get_local(sys_id)

Source

initially()


resolve(external_id)

Overrides resolve(external_id) in xml::Resolver
Source

resolve_impl(sys_id)

Source

set_cache_uris()

Configure the resolver so that it remembers URIs internally to save getting them more than once. This is on by default.
Source

set_public_mapping(pub_id, uri)

Set a mapping from a public id to an alternative URI. The alternative URI will then be loaded when the public id is encountered, rather than the given system id. The alternative may be a simple filename if desired.
Example :
 set_public_mapping("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", 
                    "/tmp/web-app_2_3.dtd")
Parameters :
pub_id - the public id
uri - the alternative uri
Source

Variable detail

cache_uris_flag


public_mapping


uri_cache