The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XRI::Resolution::Lite - The Lightweight client module for XRI Resolution

VERSION

version 0.04

SYNOPSIS

  use XML::LibXML::XPathContext;
  use XRI::Resolution::Lite;

  my $r = XRI::Resolution::Lite->new;
  my $xrds = $r->resolve('=zigorou'); ### XML::LibXML::Document
  my $ctx = XML::LibXML::XPathContext->new($xrds);
  my @services = $ctx->findnodes('//Service');

METHODS

new

$args

This param must be HASH reference. Available 2 fields.

ua

(Optional) LWP::UserAgent object or its inheritance.

resolver

(Optional) URI string of XRI Proxy Resolver. If this param is omitted, using XRI Global Proxy Resolver, "http://xri.net/", as resolver.

resolve($qxri, \%params, \%media_flags)

When type parameter is substituted "application/xrds+xml" or "application/xrd+xml", the result would be returned as XML::LibXML::Document object. Substituted "text/uri-list" to type parameter, the result would be returned as url list ARRAY or ARRAYREF.

$qxri

Query XRI string. For example :

  =zigorou
  @linksafe
  @id*zigorou
$params

This param must be HASH reference. Available 3 fields. See Section 3.3 of XRI Resolution 2.0. http://docs.oasis-open.org/xri/xri-resolution/2.0/specs/cd03/xri-resolution-V2.0-cd-03.html#_Ref129424065

format

Resolution Output Format. This param would be '_xrd_r' query parameter.

type

Service Type. This param would be '_xrd_t' query parameter.

media

Service Media Type. This param would be '_xrd_m' query parameter.

$media_flags

If you want to specify flag on or off, then substitute to 1 as true, 0 as false.

https

Specifies use of HTTPS trusted resolution. default value is 0.

saml

Specifies use of SAML trusted resolution. default value is 0.

refs

Specifies whether Refs should be followed during resolution (by default they are followed), default value is 1.

sep

Specifies whether service endpoint selection should be performed. default value is 0.

nodefault_t

Specifies whether a default match on a Type service endpoint selection element is allowed. default value is 1.

nodefault_p

Specifies whether a default match on a Path service endpoint selection element is allowed. default value is 1.

nodefault_m

Specifies whether a default match on a MediaType service endpoint selection element is allowed. default value is 1.

uric

Specifies whether a resolver should automatically construct service endpoint URIs. default value is 0.

cid

Specifies whether automatic canonical ID verification should performed. default value is 1

SEE ALSO

http://docs.oasis-open.org/xri/xri-resolution/2.0/specs/cd03/xri-resolution-V2.0-cd-03.html

There are XRI Resolution spec in OASIS.

AUTHOR

Toru Yamaguchi, <zigorou@cpan.org>

BUGS

Please report any bugs or feature requests to bug-xri-resolution-lite@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE

Copyright 2008 Toru Yamaguchi, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.