.. title:: dojo.uri.* -- The Dojo Manual

Name
===============================================================================

dojo.uri.* - URI manipulation and creation utilities

Summary and Overview
===============================================================================

``dojo.uri.Uri`` correctly creates URI objects as specified in RFC 2396.

Usage
===============================================================================

::

	var uriStr = (new dojo.uri.Uri( "http://dojootolkit.org/", 
                                    "foo/bar/",
                                    "../baz").toString());

    // uriStr is now "http://dojotoolkit.org/foo/baz"


API Reference
===============================================================================

Classes
---------------------------------------

``Uri(uri1, uri2, ...)``:

    This class represents a fully qualified URI, as defined in _`RFC 2396
    <http://www.ietf.org/rfc/rfc2396.txt>`, constructed from successive
    concatenation and correct path munging of the passed URI fragments.

    *Inherits from*:
        nothing

    ``uri1, uri2, ...``:
        Strings representing URIs. Each URI is *relative to the previous one*.

    *return*:
        Object of type ``dojo.uri.Uri``.

Properties
~~~~~~~~~~~~~

    ``uri``:
        String. The fully qualified URI.

    ``scheme``:
        String. The scheme of this URI. For HTTP requests, this is usually
        ``http``. See section 3.1 of RFC 2396 for details.

    ``authority``:
        String. The authority fragment of this URI. See section 3.2 of RFC 2396
        for details. ``user``, ``password``, ``host``, and ``port`` will only
        populated if ``authority`` is not blank or null.

    ``path``:
        String. The path fragment of this URI. See section 3.3 of RFC 2396 for
        details.

    ``query``:
        String. The query fragment of this URI. See section 3.4 of RFC 2396 for
        details.

    ``fragment``:
        String. The fragment identifier of this URI. See section 4.1 of RFC 2396
        for details.

    ``user``:
        String. The user fragment of this URI. See section 3.2.2 of RFC 2396 for
        details.

    ``password``:
        String. The password fragment of this URI. See section 3.2.2 of RFC 2396
        for details.

    ``host``:
        String. The host fragment of this URI. See section 3.2.2 of RFC 2396
        for details.

    ``host``:
        String. The port fragment of this URI. See section 3.2.2 of RFC 2396
        for details.


Methods
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    ``toString()``:

        *return*
            String representing the full URI represented by this object

Methods
---------------------------------------

``dojoUri(uri)``:

    A convenience method that returns a ``dojo.uri.Uri`` instance where ``uri``
    is a relative path from the computed root of the working Dojo instance.

    ``uri``:
        String. A relative path from the root of the currently loaded Dojo
        instance.

    *return*:
        ``dojo.uri.Uri`` corresponding to the FQDN of the passed in relative
        ``uri``.

Requires
===============================================================================

Nothing

Provides
===============================================================================

dojo.uri
    A singleton containing methods for creating unambiguous URI representations.

dojo.uri.Uri
    A class representing a URI. It's properties correspond to the various
    interesting parts of a URI and it's constructor allows you to easily build
    complex, fully qualified URIs from fragments.

To Do
===============================================================================

IPv6 support is currently missing.

About
===============================================================================

:Author: Alex Russell
:Version: 0.1
:Copyright: Dojo Foundation, 2005
:Date: 2006/12/16

.. vim:ts=4:et:tw=80:shiftwidth=4:
