used as the first path segment of a relative reference if its path component does not begin with a slash (/), as it would be mistaken for a scheme component. Such a path segment must be preceded by a dot path segment (e.g., ./foo:bar). Web document markup languages frequently use URI references to point to other resources, such as external documents or specific portions of the same logical document: in HTML, the value of the src attribute of the img element provides a URI reference, as does the value of the href attribute of the a or link element; in XML, the system identifier appearing after the SYSTEM keyword in a DTD is a fragmentless URI reference; in XSLT, the value of the href attribute of the xsl:import element/instruction is a URI reference; likewise the first argument to the document() function. https://example.com/path/resource.txt#fragment //example.com/path/resource.txt /path/resource.txt path/resource.txt ../resource.txt ./resource.txt resource.txt #fragment Resolution Resolving a URI reference against a base URI results in a target URI. This implies that the base URI exists and is an absolute URI (a URI with no fragment component). The base URI can be obtained, in order of precedence, from: the reference URI itself if it is a URI; the content of the representation; the entity encapsulating the representation; the URI used for the actual retrieval of the representation; the context of the application. Within a representation with a well defined base URI of http://a/b/c/d;p?q a relative reference is resolved to its target URI as follows: "g:h" -> "g:h" "g" -> "http://a/b/c/g" "./g" -> "http://a/b/c/g" "g/" -> "http://a/b/c/g/" "/g" -> "http://a/g" "//g" -> "http://g" "?y" -> "http://a/b/c/d;p?y" "g?y" -> "http://a/b/c/g?y" "#s" -> "http://a/b/c/d;p?q#s" "g#s" -> "http://a/b/c/g#s" "g?y#s" -> "http://a/b/c/g?y#s" ";x" -> "http://a/b/c/;x" "g;x" -> "http://a/b/c/g;x" "g;x?y#s" -> "http://a/b/c/g;x?y#s" "" -> "http://a/b/c/d;p?q" "." -> "http://a/b/c/" "./" -> "http://a/b/c/" ".." -> "http://a/b/" "../" -> "http://a/b/" "../g" -> "http://a/b/g" "../.." -> "http://a/" "../../" -> "http://a/" "../../g" -> "http://a/g" URL munging URL munging is a technique by which a command is appended to a URL, usually at the end, after a "?" token. It's commonly used in WebDAV as a mechanism of adding functionality to HTTP. In a versioning system, for example, to add a "checkout" command to a URL, it's written as http://editing.com/resource/file.php?command=checkout. It has the advantage of both being easy for CGI parsers and also acts as an intermediary between HTTP and underlying resource, in this case. Relation to XML