Learn R Programming

XML (version 3.1-1)

getRelativeURL: Compute name of URL relative to a base URL

Description

This function is a convenience function for computing the fullly qualified URI of a document relative to a base URL. It handles the case where the document is already fully qualified and so ignores the base URL or, alternatively, is a relative document name and so prepends the base URL. It does not (yet) try to be clever by collapsing relative directories such as "..".

Usage

getRelativeURL(u, baseURL, sep = "/")

Arguments

Value

  • A character string giving the fully qualified URI for u.

concept

XML

Details

This uses the function parseURI to compute the components of the different URIs.

See Also

parseURI which uses the libxml2 facilities for parsing URIs. xmlParse, xmlTreeParse, xmlInternalTreeParse. XInclude and XML Schema import/include elements for computing relative locations of included/imported files..