| XUriReference | 
 
| makeRelative( | 
[in] XUriReference | 
 baseUriReference, | 
 
 | [in] XUriReference | 
 uriReference, | 
 
 | [in] boolean | 
 preferAuthorityOverRelativePath, | 
 
 | [in] boolean | 
 preferAbsoluteOverRelativePath, | 
 
 | [in] boolean | 
 encodeRetainedSpecialSegments ); | 
 
 
 
- Description
 
- changes an absolute URI refrence to relative form.
 
 
- Parameter baseUriReference
 
- the base URI reference.
 
 
- Parameter uriReference
 
- any URI reference.
 
 
- Parameter preferAuthorityOverRelativePath
 
- controls how a relative URI reference is generated when both
 
baseUriReference (e.g.,
 “scheme://auth/a/b”) and
 uriReference (e.g.,
 “scheme://auth//c/d”) have the same scheme and
 authority components, and the path component of uriReference
 starts with “//”. If true, the generated
 relative URI reference includes an authority component (e.g.,
 “//auth//c/d”); if false, the generated
 relative URI reference has a relative path (e.g.,
 “..//c/d”).
  
- Parameter preferAbsoluteOverRelativePath
 
- controls how a relative URI reference is generated when both
 
baseUriReference (e.g.,
 “scheme://auth/a/b”) and
 uriReference (e.g.,
 “scheme://auth/c/d”) have the same scheme and
 authority components (if present), but share no common path segments. If
 true, the generated relative URI reference has an absolute path (e.g.,
 “/c/d”); if false, the generated relative URI
 reference has a relative path (e.g., “../c/d”).
  
- Parameter encodeRetainedSpecialSegments
 
- if true, special segments (“
.” and
 “..”) that are already present in the path
 component of the given uriReference and which end up in a
 relative path returned from this method, are encoded (as
 “%2E” and “%2E%2E”,
 respectively).
  
- Returns
 
- a fresh object that supports
 XUriReference, if the given
 
uriReference is either already relative, or is not
 hierarchical, or is of a different scheme than the given
 baseUriReference, or can be changed to a relative URI
 reference, relative to the given baseUriReference;
 otherwise, NULL is returned. Especially, if
 baseUriReference is NULL, or is not an absolute,
 hierarchical URI reference, or if uriReference is NULL,
 then NULL is always returned.
  
 
 |