
XRI - Resolver for eXtensible Resource Identifiers

use XRI;
my $XRI = XRI->new($xri);
$XRI->resolveToAuthorityXML;
print $XRI->{descriptorXML};
$XRI->resolveToLocalAccessURI;
$XRI->resolveToLocalAccessURI(service, type);
print $XRI->{localAccessURL};
print $XRI->doGet;

Resolve an XRI to a LocalAccess URL or an XRIAuthority Descriptor

The XRI Resolver Library resolves an XRI to a LocalAccess URL or an XRIAuthority Descriptor. It can also be used to actually fetch the data at the LocalAccess URL.

These strings are returned via die() so trap them by running library calls within an eval{} block $@ will be set to the error code, if any.
RelativePathNotXRIAuthority for passed service or type
URIAuthorityNotXRIAuthority for passed service or type
UnknownAuthority: $subseg
NoDescriptorXML for $url
MalformedXRIDescriptor for $url
NoLocalAccessFound for XRI $self->{xri}


XRI OASIS TC: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xri
XRI Specification: http://www.oasis-open.org/committees/download.php/5109/xri-syntax-resolution-1.0-cd.pdf
Mailing list: http://idcommons.net/cgi-bin/mailman/listinfo/xrixdi
Wiki: http://xrixdi.idcommons.net/

Fen Labalme, <fen@idcommons.net>

Copyright 2004 Identity Commons
See LICENSE.