Aaron Straup Cope > Apache-XPointer-RDQL-1.1 > Apache::XPointer::RDQL::RDFStore

Download:
Apache-XPointer-RDQL-1.1.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.1   Source  

NAME ^

Apache::XPointer::RDQL::RDFStore - mod_perl handler to address XML fragments using the RDF Data Query Language.

SYNOPSIS ^

 <Directory /foo/bar>

  <FilesMatch "\.rdf$">
   SetHandler   perl-script
   PerlHandler  Apache::XPointer::RDQL::RDFStore

   PerlSetVar   XPointerSendRangeAs  "XML"
  </FilesMatch>

 </Directory>

 #

 my $ua  = LWP::UserAgent->new();
 my $req = HTTP::Request->new(GET => "http://example.com/foo/bar/baz.rdf");

 $req->header("Range" => qq(SELECT ?title, ?link
                            WHERE
                            (?item, <rdf:type>, <rss:item>),
                            (?item, <rss::title>, ?title),
                            (?item, <rss::link>, ?link)
                            USING
                            rdf for <http://www.w3.org/1999/02/22-rdf-syntax-ns#>,
                            rss for <http://purl.org/rss/1.0/>));

 $req->header("Accept" => "application/rdf+xml");

 my $res = $ua->request($req);

DESCRIPTION ^

Apache::XPointer::RDQL::RDFStore is a mod_perl handler to address XML fragments using the HTTP 1.1 Range and Accept headers and the XPath scheme, as described in the paper : A Semantic Web Resource Protocol: XPointer and HTTP.

Additionally, the handler may also be configured to recognize a conventional CGI parameter as a valid range identifier.

If no 'range' property is found, then the original document is sent unaltered.

If an Accept header is specified with no corresponding match, then the server will return (406) HTTP_NOT_ACCEPTABLE.

Successful queries will return (206) HTTP_PARTIAL_CONTENT.

OPTIONS ^

XPointerSendRangeAs

Return matches as one of the following content-types :

Required

XPointerAllowCGI

If set to On then the handler will check for CGI parameters as well as HTTP headers. CGI parameters are checked only if no matching HTTP header is present.

Case insensitive.

XPointerCGIRangeParam

The name of the CGI parameter to check for an RDQL range.

Default is range

XPointerCGIAcceptParam

The name of the CGI parameter to list one or more acceptable content types for a response.

Default is accept

MOD_PERL COMPATIBILITY ^

This handler will work with both mod_perl 1.x and mod_perl 2.x.

VERSION ^

1.1

DATE ^

$Date: 2004/11/16 04:33:33 $

AUTHOR ^

Aaron Straup Cope <ascope@cpan.org>

SEE ALSO ^

Apache::XPointer

LICENSE ^

Copyright (c) 2004 Aaron Straup Cope. All rights reserved.

This is free software, you may use it and distribute it under the same terms as Perl itself.

syntax highlighting: