ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 11.0

# iri

Class, net.uri package

This is the class of IRI (Internationalized Resource Indicator) objects. Use make-instance to create instances. See also string-to-iri and iri-p. IRIs differ from URIs in that non-ASCII characters are allowed when IRI strings are parsed.

The slots are inherited from the uri class, which is a superclass of the iri class. See the description of the uri class

See also uri.html for general information on Universal Resource Indicator support in Allegro CL.

# uri

Class, net.uri package

This is the class of URI (Universal Resource Indicator) objects. Use make-instance to create instances. See also string-to-uri, parse-uri, and uri-p.

The uri class is a superclass of the iri class. Note this is opposite from the actual relationship between URIs and IRIs (every URI is an IRI but not vice versa, while every instance of the iri class is an instance or the uri class, but again not vice versa). This relationship was required for implementation reasons. See the note in uri-p about this.

URI objects have the following slots:

    scheme
    host
    port
    path
    query
    fragment
    ipv6
    zone-id
    plist
    userinfo

The `host` and `port` slots together correspond to the `authority` (see Introduction in uri.html). There is an accessor-like function, uri-authority, that can be used to extract the authority from a URI. The `plist` slot contains a standard Common Lisp property list.

See also uri.html for general information on Universal Resource Indicator support in Allegro CL.

# urn

Class, net.uri package

This is the class of URI (Universal Resource Indicator) objects.URN's are a subset of URI's. RFC8141 defines URNs as:

    <URN> ::= "urn:" <NID> ":" <NSS> "?+" <r-component> "?=" <q-component> "#" <f-component>

where is the Namespace Identifier, and is the Namespace Specific String, and then the r, q, and f components. The leading "urn:" sequence is case-insensitive. urn-nid accesses the NID of an URN. The related function urn-nss accesses the NSS. urn-r-component, urn-q-component, and urn-f-component access the r, q, and f components. The Namespace ID determines the syntactic interpretation of the Namespace Specific String. Thus:

    cg-user(13): (setq urn (net.uri:parse-uri "urn:foo:10?+rrr?=qqq#fff"))
    #<urn urn:foo:10?+rrr?=qqq#fff>
    cg-user(14): (net.uri:urn-nid urn)
    "foo"
    cg-user(15): (net.uri:urn-nss urn)
    "10"
    cg-user(16): (net.uri:urn-r-component urn)
    "rrr"
    cg-user(17): (net.uri:urn-q-component urn)
    "qqq"
    cg-user(18): (net.uri:urn-f-component urn)
    "fff"
    cg-user(19):

See also uri.html for general information on Universal Resource Indicator support in Allegro CL.

Copyright (c) Franz Inc. Lafayette, CA., USA. All rights reserved.

ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 11.0