getRelativeURL              package:XML              R Documentation

_C_o_m_p_u_t_e _n_a_m_e _o_f _U_R_L _r_e_l_a_t_i_v_e _t_o _a _b_a_s_e _U_R_L

_D_e_s_c_r_i_p_t_i_o_n:

     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 "..".

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

       u: the location of the target document whose fully qualified URI
          is to be determined.

 baseURL: the base URL relative to which the value of 'u' should be
          interpreted.

     sep: the separator to use to separate elements of the path. For
          external URLs (e.g.  accessed via HTTP, HTTPS, FTP), / should
          be used. For local files on Windows machines  one might use
          '.Platform$file.sep', but this is incorrect unless one knows
          that the resulting file is to be accessed using Windows file
          system notation, i.e.  'C:\\my\\folder\\file'. .

_D_e_t_a_i_l_s:

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

_V_a_l_u_e:

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

_A_u_t_h_o_r(_s):

     Duncan Temple Lang

_S_e_e _A_l_s_o:

     '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..

