Package openid :: Package yadis :: Module xri
[frames | no frames]

Module openid.yadis.xri

Utility functions for handling XRIs.

See Also: XRI Syntax v2.0 at the OASIS XRI Technical Committee

Function Summary
  escapeForIRI(xri)
Escape things that need to be escaped when transforming to an IRI.
  identifierScheme(identifier)
Determine if this identifier is an XRI or URI.
  iriToURI(iri)
Transform an IRI to a URI by escaping unicode.
bool providerIsAuthoritative(providerID, canonicalID)
Is this provider ID authoritative for this XRI?
unicode rootAuthority(xri)
Return the root authority for an XRI.
  toIRINormal(xri)
Transform an XRI to IRI-normal form.
  toURINormal(xri)
Transform an XRI to URI normal form.
  XRI(xri)
An XRI object allowing comparison of XRI.

Function Details

escapeForIRI(xri)

Escape things that need to be escaped when transforming to an IRI.

identifierScheme(identifier)

Determine if this identifier is an XRI or URI.
Returns:
"XRI" or "URI"

iriToURI(iri)

Transform an IRI to a URI by escaping unicode.

providerIsAuthoritative(providerID, canonicalID)

Is this provider ID authoritative for this XRI?
Returns:
bool

rootAuthority(xri)

Return the root authority for an XRI.

Example:
   rootAuthority("xri://@example") == "xri://@"
Parameters:
xri
           (type=unicode)
Returns:
unicode

toIRINormal(xri)

Transform an XRI to IRI-normal form.

toURINormal(xri)

Transform an XRI to URI normal form.

XRI(xri)

An XRI object allowing comparison of XRI.

Ideally, this would do full normalization and provide comparsion operators as per XRI Syntax. Right now, it just does a bit of canonicalization by ensuring the xri scheme is present.
Parameters:
xri - an xri string
           (type=unicode)

Generated by Epydoc 2.1 on Wed Apr 22 16:14:20 2009 http://epydoc.sf.net