.\" .\" libraptor.3 - Raptor library manual page .\" .\" $Id$ .\" .\" Copyright (C) 2002-2004 David Beckett - http://purl.org/net/dajobe/ .\" Institute for Learning and Research Technology - http://www.ilrt.bris.ac.uk/ .\" University of Bristol - http://www.bristol.ac.uk/ .\" .TH libraptor 3 "2004-06-24" .\" Please adjust this date whenever revising the manpage. .SH NAME libraptor \- Raptor RDF parser toolkit library .SH SYNOPSIS .nf .B #include .br .br .BI raptor_init(); .br .BI "raptor_parser *" p =raptor_new_parser("rdfxml"); .br .BI raptor_set_statement_handler( p , NULL , print_statements ); .br .BI "raptor_uri *" file_uri =raptor_new_uri("http://example.org/"); .br .BI raptor_parse_file( p , file_uri , base_uri ); .br .BI raptor_parse_uri( p , uri , NULL ); .br .BI raptor_free_parser( p ); .br .BI raptor_free_uri( file_uri ); .br .BI raptor_finish(); .br .B cc file.c -lraptor .br .fi .SH DESCRIPTION The \fIRaptor\fR library provides a high-level interface to a set of RDF format parsers, presently RDF/XML and N-Triples. The parsers turn the syntax into a sequence of RDF triples/statements. The RDF/XML parser uses either \fIexpat\fR or \fIlibxml\fR XML parser for providing the SAX event stream. The library functions are arranged in an object-oriented style with constructors, destructors and method calls. The statements and error messages are delivered via callback functions. .LP Raptor contains a URI-reference parsing and resolving (not retrieval) class (raptor_uri) sufficient for dealing with URI-references inside RDF. This functionality is modular and can be transparently replaced with another existing and compatible URI implementation. .LP It also provides a URI-retrieval class (raptor_www) for wrapping existing library such as libcurl, libxml2 or BSD libfetch that provides full or partial retrieval of data from URIs. .LP Raptor uses Unicode strings for RDF literals and URIs and preserves them throughout the library. It uses the UTF-8 encoding of Unicode at the API for passing in or returning Unicode strings. It is intended that the preservation of Unicode for URIs will support Internationalized Resource Identifiers (IRIs) which are still under development and standardisation. .SH LIBRARY INITIALISATION AND CLEANUP .IP "\fBraptor_init()\fR" .IP "\fBraptor_finish()\fR" Initialise and cleanup the library. These must be called before any raptor_parser or raptor_uri is created or used. .SH PARSER CONSTRUCTORS .IP "\fBraptor_parser* raptor_new_parser(name)\fR" Create a new raptor parser object for the parser with name \fIname\fR currently either "rdfxml", "turtle" or "rss-tag-soup" for the RSS Tag Soup parser. .IP "\fBraptor_parser* raptor_new_parser_for_content(raptor_uri *\fIuri\fP, const char *\fImime_type\fP, const unsigned char *\fIbuffer\fP, size_t \fIlen\fP, const unsigned char *\fIidentifier\fP)\fR" Create a new raptor parser object for a syntax identified by URI \fIuri\fR, MIME type \fImime_type\fR, some initial content \fIbuffer\fR of size \fIlen\fR or content with identifier \fIidentifier\fR. See the raptor_guess_parser_name description for further details. .SH PARSER DESTRUCTORS .IP "\fBvoid raptor_free_parser(raptor_parser *\fIparser\fB)\fR" Destroy a Raptor parser object. .SH "PARSER MESSAGE CALLBACK METHODS" Several methods can be registered for the parser that return a variable-argument message in the style of printf(3). These also return a \fIraptor_locator\fR that can contain URI, file, line, column and byte counts of where the message is about. This structure can be used with the raptor_format_locator, raptor_print_locator functions below or the structures fields directly, which are defined in raptor.h .IP "\fBvoid raptor_set_fatal_error_handler(raptor_parser* \fIparser, void *\fIuser_data, raptor_message_handler handler)\fR" Set fatal error handler callback. .IP "\fBvoid raptor_set_error_handler(raptor_parser* \fIparser\fB, void *\fIuser_data\fB, raptor_message_handler \fIhandler\fB)\fR" Set non-fatal error handler callback. .IP "\fBvoid raptor_set_warning_handler(raptor_parser* \fIparser\fB, void *\fIuser_data\fB, raptor_message_handler \fIhandler\fB)\fR" Set warning message handler callback. .SH "PARSER STATEMENT CALLBACK METHOD" The parser allows the registration of a callback function to return the statements to the application. .IP "\fBvoid raptor_set_statement_handler(raptor_parser* \fIparser\fB, void *\fIuser_data\fB, raptor_statement_handler \fIhandler\fB)\fR" Set the statement callback function for the parser. The \fIraptor_statement\fR structure is defined in raptor.h and includes fields for the subject, predicate, object of the statements along with their types and for literals, language and datatype. .SH "PARSER PARSING METHODS" These methods perform the entire parsing in one method. Statements warnings, errors and fatal errors are delivered via the registered statement, error etc. handler functions. .LP In both of these methods, the base URI is required for the RDF/XML parser (name "rdfxml") and Turtle parser (name "turtle"). The N-Triples parser (name "ntriples") or RSS Tag Soup parser (name "rss-tag-soup") do not use this. .IP "\fBint raptor_parse_file(raptor_parser* \fIparser\fB, raptor_uri *\fIuri\fB, raptor_uri *\fIbase_uri\fB)\fR" Parse the given filename (a URI like file:filename) according to the optional base URI \fIbase_uri\fR. If \fIuri\fR is NULL, read from standard input and \fIbase_uri\fR is then required. .IP "\fBint raptor_parse_file_stream(raptor_parser* \fIparser\fB, FILE* \fIstream\fB, const char* \fIfilename\fB, raptor_uri *\fIbase_uri\fB)\fR" Parse the given C FILE* stream according to the base URI \fIbase_uri\fR (required). \fIfilename\fR is optional and if given, is used for error messages via the raptor_locator structure. .IP "\fBint raptor_parse_uri(raptor_parser* \fIparser\fB, raptor_uri* \fIuri\fB, raptor_uri *\fIbase_uri\fB)\fR" Parse the URI according to the base URI \fIbase_uri\fR, or NULL if not needed. If no base URI is given, the \fIuri\fR is used. This method depends on the raptor_www subsystem (see \fBWWW Class\fR section below) and an existing underlying URI retrieval implementation such as libcurl, libxml or BSD libfetch to retrieve the content. .SH "PARSER CHUNKED PARSING METHODS" These methods perform the parsing in parts by working on multiple chunks of memory passed by the application. Statements warnings, errors and fatal errors are delivered via the registered statement, error etc. handler functions. .IP "\fBint raptor_start_parse(raptor_parser* \fIparser\fB, const char *\fIuri\fB)\fR" Start a parse of chunked content with the base URI \fIuri\fR or NULL if not needed. The base URI is required for the RDF/XML parser (name "rdfxml") and Turtle parser (name "turtle"). The N-Triples parser (name "ntriples") or RSS Tag Soup parser (name "rss-tag-soup") do not use this. .IP "\fBint raptor_parse_chunk(raptor_parser* \fIparser\fB, const unsigned char *buffer, size_t \fIlen\fB, int \fIis_end\fB)\fR" Parse the memory at \fIbuffer\fR of size \fIlen\fR returning statements via the statement handler callback. If \fIis_end\fR is non-zero, it indicates the end of the parsing stream. This method can only be called after raptor_start_parse. .SH "PARSER UTILITY METHODS" .IP "\fBconst char* raptor_get_mime_type(raptor_parser* \fIrdf_parser\fB)\fR" Return the MIME type for the parser. .IP "\fBvoid raptor_set_parser_strict(raptor_parser *\fIparser\fB, int \fIis_strict\fB)\fR" Set the parser to strict (\fIis_strict\fR not zero) or lax (default) mode. The detail of the strictness can be controlled by raptor_set_feature. .IP "\fBint raptor_set_feature(raptor_parser *\fIparser\fB, raptor_feature \fIfeature\fB, int \fIvalue\fB)\fR" Set a parser feature \fIfeature\fR to a particular \fIvalue\fR. Returns non 0 on failure or if the feature is unknown. The current defined features are: \fIFeature Values\fR \fBRAPTOR_FEATURE_SCANNING\fR Boolean (non 0 true) \fBRAPTOR_FEATURE_ASSUME_IS_RDF\fR Boolean (non 0 true) \fBRAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES\fR Boolean (non 0 true) \fBRAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES\fR Boolean (non 0 true) \fBRAPTOR_FEATURE_ALLOW_BAGID\fR Boolean (non 0 true) \fBRAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST\fR Boolean (non 0 true) \fBRAPTOR_FEATURE_NORMALIZE_LANGUAGE\fR Boolean (non 0 true) \fBRAPTOR_FEATURE_NON_NFC_FATAL\fR Boolean (non 0 true) If the \fIscanning\fR feature is true (default false), then the RDF/XML parser will look for embedded rdf:RDF elements inside the XML content, and not require that the XML start with an rdf:RDF root element. .P If the \fIassume_is_rdf\fR feature is true (default false), then the RDF/XML parser will assume the content is RDF/XML, not require that rdf:RDF root element, and immediately interpret the content as RDF/XML. .P If the \fIallow_non_ns_attributes\fR feature is true (default true), then the RDF/XML parser will allow non-XML namespaced attributes to be accepted as well as rdf: namespaced ones. For example, 'about' and 'ID' will be interpreted as if they were rdf:about and rdf:ID respectively. .P If the \fIallow_other_parsetypes\fR feature is true (default true) then the RDF/XML parser will allow unknown parsetypes to be present and will pass them on to the user. Unimplemented at present. .P If the \fIallow_bagid\fR feature is true (default true) then the RDF/XML parser will support the rdf:bagID attribute that was removed from the RDF/XML language when it was revised. This support may be removed in future. .P If the \fIallow_rdf_type_rdf_list\fR feature is true (default false) then the RDF/XML parser will generate the idList rdf:type rdf:List triple in the handling of rdf:parseType="Collection". This triple was removed during the revising of RDF/XML after collections were initially added. .P If the \fInormalize_language\fR feature is true (default true) then XML language values such as from xml:lang will be normalized to lowercase. .P If the \fInon_nfc_fatal\fR feature is true (default false) then illegal Unicode Normal Form C in literals will give a fatal error, otherwise it gives a warning. .IP "\fBint raptor_get_feature(raptor_parser* \fIparser\fB, raptor_feature \fIfeature\fB)\fR" Get parser features, the allowed \fIfeature\fP values are available via \fBraptor_features_enumerate\fP. .IP "\fBraptor_locator* raptor_get_locator(raptor_parser* \fIrdf_parser\fB)\fR" Return the current raptor_locator object for the parser. This is a public structure defined in raptor.h that can be used directly, or formatted via raptor_print_locator. .IP "\fBvoid raptor_get_name(raptor_parser *\fIparser\fB\fB)\fR" Return the string short name for the parser. .IP "\fBvoid raptor_get_label(raptor_parser *\fIparser\fB\fB)\fR" Return a string label for the parser. .IP "\fBvoid raptor_set_default_generate_id_parameters(raptor_parser* \fIrdf_parser\fB, char *\fIprefix\fB, int \fIbase\fB)\fR" Control the default method for generation of IDs for blank nodes and bags. The method uses a short string \fIprefix\fR and an integer \fIbase\fR to generate the identifier which is not guaranteed to be a strict concatenation. If \fIprefix\fR is NULL, the default is used. If base is less than 1, it is initialised to 1. .IP "\fBvoid raptor_set_generate_id_handler(raptor_parser* \fIparser\fB, void *\fIuser_data\fB, raptor_generate_id_handler \fIhandler\fB)\fR" Allow full customisation of the generated IDs by setting a callback \fIhandler\fR and associated \fIuser_data\fR that is called whenever a blank node or bag identifier is required. The memory returned is deallocated inside raptor. Some systems require this to be allocated inside the same library, in which case the \fBraptor_alloc_memory\fP function may be useful. .SH "PARSER UTILITY FUNCTIONS" .IP "\fBint raptor_parsers_enumerate(const unsigned int \fIcounter\fB, const char **name, const char **\fIlabel\fB)\fR" Return the parser name/label for a parser with a given integer counter, returning non-zero if no such parser at that offset exists. The counter should start from 0 and be incremented by 1 until the function returns non-zero. .IP "\fBint raptor_syntaxes_enumerate(const unsigned int \fIcounter\fB, const char **name, const char **\fIlabel\fB, const char **\fImime_type\fB, const unsigned char **\fIuri-string\fB)\fR" Return the name, label, mime type or URI string (all optional) for a parser syntax with a given integer counter, returning non-zero if no such syntax parser at that offset exists. The counter should start from 0 and be incremented by 1 until the function returns non-zero. .IP "\fBint raptor_features_enumerate(const raptor_feature \fIfeature\fP, const char **\fIname\fP, raptor_uri **\fIuri\fP, const char **\fIlabel\fP)\fR" Return the name, URI, string label (all optional) for a parser \fIfeature\fP, returning non-zero if no such feature exists. .IP "\fBint raptor_syntax_name_check(const char *\fIname\fP)\fR" Check \fIname\fP is a known syntax name. .IP "\fBconst char* raptor_guess_parser_name(raptor_uri *\fIuri\fP, const char *\fImime_type\fP, const unsigned char *\fIbuffer\fP, size_t \fIlen\fP, const unsigned char *\fIidentifier\fP)\fR" Guess a parser name for a syntax identified by URI \fIuri\fR, MIME type \fImime_type\fR, some initial content \fIbuffer\fR of size \fIlen\fR or with content identifier \fIidentifier\fR. All of these parameters are optional and only used if not NULL. The parser is chosen by scoring the hints that are given. .IP "\fBraptor_feature raptor_feature_from_uri(raptor_uri *\fIuri\fP)\fR" Turn a URI \fIuri\fR into a raptor feature identifier, or <0 if the feature is unknown. .SH "STATEMENT UTILITY FUNCTIONS" .IP "\fBvoid raptor_print_statement(const raptor_statement* const \fIstatement\fB, FILE *\fIstream\fB)\fR" Print a raptor statement object in a simple format for debugging only. The format of this output is not guaranteed to remain the same between releases. .IP "\fBvoid raptor_print_statement_as_ntriples(const raptor_statement* \fIstatement\fB, FILE *\fIstream\fB)\fR" Print a raptor statement object in N-Triples format, using all the escapes as defined in .UR http://www.w3.org/TR/rdf-testcases/#ntriples http://www.w3.org/TR/rdf-testcases/#ntriples .UE .IP "\fBraptor_statement_part_as_counted_string(const void *\fIterm\fB, raptor_identifier_type \fItype\fB, raptor_uri* \fIliteral_datatype\fB, const unsigned char *\fIliteral_language\fB, size_t* \fIlen_p\fB)\fR" .IP "\fBchar* raptor_statement_part_as_string(const void *\fIterm\fB, raptor_identifier_type \fItype\fB, raptor_uri* \fIliteral_datatype\fB, const unsigned char *\fIliteral_language\fB)\fR" Turns part of raptor statement into N-Triples format, using all the escapes as defined in .UR http://www.w3.org/TR/rdf-testcases/#ntriples http://www.w3.org/TR/rdf-testcases/#ntriples .UE The part (subject, predicate, object) of the raptor_statement is passed in as \fIterm\fR, the part type (subject_type, predicate_type, object_type) is passed in as \fItype\fR. When the part is a literal, the \fIliteral_datatype\fR and \fIliteral_language\fR fields are set, otherwise NULL (usually object_datatype, object_literal_language). .IP If \fBraptor_statement_part_as_counted_string\fR is used, the length of the returned string is stored in *\fIlen_p\fR if not NULL. .SH "LOCATOR UTILITY FUNCTIONS" .IP "\fBint raptor_format_locator(char *\fIbuffer\fB, size_t \fIlength\fB, raptor_locator* \fIlocator\fB)\fR" This method takes a \fIraptor_locator\fR object as passed to an error, warning or other handler callback and formats it into the \fIbuffer\fR of size \fIlength\fR bytes. If \fIbuffer\fR is NULL or \fIlength\fR is insufficient for the size of the formatted locator, returns the number of additional bytes required in the buffer to write the locator. In particular, if this form is used: length=raptor_format_locator(NULL, 0, locator) it will return in \fIlength\fR the size of a buffer that can be allocated for \fIlocator\fR and a second call will perform the formatting: raptor_format_locator(buffer, length, locator) .IP "\fBvoid raptor_print_locator(FILE *\fIstream\fB, raptor_locator* \fIlocator\fB)\fR" This method takes a \fIraptor_locator\fR object as passed to an error, warning or other handler callback, formats and prints it to the given stdio \fIstream\fR. .SH "N-TRIPLES UTILITY FUNCTIONS" .IP "\fBvoid raptor_print_ntriples_string(FILE* \fIstream\fB, const char* \fIstring\fB, const char \fIdelim\fB)\fR" This is a standalone function that prints the given string according to N-Triples escaping rules, expecting to be delimited by the character \fIdelim\fR which is usually either \(dq or < .IP "\fBconst char* raptor_ntriples_term_as_string (raptor_ntriples_term_type term)\fR" .SH "XML UTILITY FUNCTIONS" .IP "\fBsize_t raptor_xml_escape_string(const unsigned char *\fIstring\fB, size_t \fIlen\fB, unsigned char *\fIbuffer\fB, size_t \fIlength\fB, char \fIquote\fB, raptor_message_handler \fIerror_handler\fB, void *\fIerror_data\fB)\fR" Apply the XML escaping rules to the string given in (string, len) into the buffer of size length. If quote is given, the escaped content is for an XML attribute and the appropriate quote character \" or \' is used, otherwise it is XML element content (CDATA). The \fIerror_handler\fR method along with \fIerror_data\fR allow error reporting to be given. If buffer is NULL, returns the size of the buffer required to escape. Otherwise the return value is the number of bytes used or 0 on failure. .SH "MEMORY UTILITY FUNCTIONS" .IP "\fBvoid raptor_free_memory(void *ptr)\fR" Free memory allocated inside raptor. Some systems require memory allocated in a library to be deallocated inside that library. This function can be used in that situation to free memory allocated by raptor, such as the result of the \fI_to_\fP methods that return allocated memory such as \fBraptor_uri_to_filename\fP or \fBraptor_uri_to_string\fP. .IP "\fBvoid* raptor_alloc_memory(size_t size)\fR" Allocate memory inside the raptor library. Some systems require memory allocated in a library to be deallocated inside that library. This function can be used in that situation to allocate memory for raptor to free later, such as inside the handler function declared with \fBraptor_set_generate_id_handler\fP which returns new memory. .SH "UNICODE UTILITY FUNCTIONS" .IP "\fBint raptor_unicode_char_to_utf8(unsigned long \fIc\fP, unsigned char *\fIoutput\fP)\fR" Turn a Unicode character into UTF8 bytes in \fIoutput\fP of size \fIc\fP bytes which must be of sufficient size. Returns the number of bytes encoded or <0 on failure. .IP "\fBint raptor_utf8_to_unicode_char(unsigned long *\fIoutput\fP, const unsigned char *\fIinput\fP, int \fIlength\fP)\fR" Decode a sequence UTF8 bytes in \fIinput\fP of size \fIlength\fP into a Unicode character in \fIoutput\fR returning the number of bytes used or <0 on failure. .SH "MISCELLANEOUS UTILITY FUNCTIONS" .IP "\fBchar* raptor_vsnprintf(const char *message, va_list arguments)\fR" Compatibility wrapper around vsnprintf. .SH "STATIC VARIABLES" There are several read-only static variables in the raptor library: .IP "\fBconst char * const raptor_short_copyright_string\fR" Short copyright string, suitable for one line. .IP "\fBconst char * const raptor_copyright_string\fR" Full copyright over several lines including URLs. .IP "\fBconst char * const raptor_version_string\fR" The version as a string .IP "\fBconst unsigned int raptor_version_major\fR" The major version number as an integer. .IP "\fBconst unsigned int raptor_version_minor\fR" The minor version number as an integer. .IP "\fBconst unsigned int raptor_version_release\fR" The release version number as an integer. .IP "\fBconst unsigned int raptor_version_decimal\fR" The version number as a single decimal. .SH "URI CLASS" Raptor has a raptor_uri class must be used for manipulating and passing URI references. The default internal implementation uses char* strings for URIs, manipulating them and constructing them. This URI implementation can be replaced by any other that provides the equivalent functionality, using the raptor_uri_set_handler function. .SH "URI CONSTRUCTORS" There a several constructors for raptor_uri to build them from char* strings and existing raptor_uri objects. .IP "\fBraptor_uri* raptor_new_uri(const unsigned char* \fIuri_string\fB)\fR" Create a raptor URI from a string URI-reference \fIuri_string\fR. .IP "\fBraptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri* \fIuri\fB, const unsigned char* \fIlocal_name\fB)\fR" Create a raptor URI from a string URI-reference \fIlocal_name\fR relative to an existing URI-reference. This performs concatenation of the \fIlocal_name\fR to the \fIuri\fR and not relative URI resolution, which is done by the raptor_new_uri_relative_to_base constructor. .IP "\fBraptor_uri* raptor_new_uri_relative_to_base(raptor_uri* \fIbase_uri, const unsigned char* \fIuri_string\fB)\fR" Create a raptor URI from a string URI-reference \fIuri_string\fR using relative URI resolution to the \fIbase_uri\fR. .IP "\fBraptor_uri* raptor_new_uri_from_id(raptor_uri* \fIbase_uri\fB, const unsigned char* \fIid\fB)\fR" Create a raptor URI from a string RDF ID \fIid\fR concatenated to the \fIbase_uri\fR base URI. .IP "\fBraptor_uri* raptor_new_uri_for_rdf_concept(const char* \fIname\fB)\fR" Create a raptor URI for the RDF namespace concept \fIname\fR. .IP "\fBraptor_uri* raptor_new_uri_for_xmlbase(raptor_uri* \fIold_uri\fB))\fR" Create a raptor URI suitable for use with xml:base (throw away fragment) .SH "URI DESTRUCTOR" .IP "\fBvoid raptor_free_uri(raptor_uri* \fIuri\fB)\fR" Destroy a raptor URI object. .SH "URI METHODS" .IP "\fBint raptor_uri_equals(raptor_uri* \fIuri1\fB, raptor_uri* \fIuri2\fB)\fR" Return non-zero if the given URIs are equal. .IP "\fBraptor_uri* raptor_uri_copy(raptor_uri* \fIuri\fB)\fR" Return a copy of the given raptor URI \fIuri\fR. .IP "\fBunsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p)\fR" .IP "\fBunsigned char* raptor_uri_as_string(raptor_uri* \fIuri\fB)\fR" Return a shared pointer to a string representation of the given raptor URI \fIuri\fR. This string is shared and must not be freed. If raptor_uri_as_counted_string is used, the length of the returned string is stored in *len_p if not NULL. .SH "URI UTILITY FUNCTIONS" .IP "\fBvoid raptor_uri_resolve_uri_reference (const unsigned char* \fIbase_uri\fB, const unsigned char* \fIreference_uri\fB, char unsigned* \fIbuffer\fB, size_t \fIlength\fB)\fR" This is a standalone function that resolves the relative URI \fIreference_uri\fR against the base URI \fIbase_uri\fR according to the URI resolution rules in RFC2396. The resulting URI is stored in \fIbuffer\fR which is of \fIlength\fR bytes. If this is too small, no work will be done. .IP "\fBchar *raptor_uri_filename_to_uri_string(const unsigned char* \fIfilename\fB)\fR" This is a standalone function that turns a local filename (Windows or Unix style as appropriate for platform) into a URI string (file). The returned string must be freed by the caller. Some systems require memory allocated in a library to be deallocated inside that library in which case \fBraptor_free_memory\fP may be used. .IP "\fBchar *raptor_uri_uri_string_to_filename(const unsigned char* \fIuri_string\fB)\fR" .IP "\fBchar *raptor_uri_uri_string_to_filename(const unsigned char* \fIuri_string\fB, unsigned char **\fIfragment_p\fP)\fR" These are standalone functions that turn a URI string that represents a local filename (file:) into a filename, with optional URI fragment. If \fIfragment_p\fP is not NULL it points to the location to store a newly allocated string containing the fragment. The returned strings must be freed by the caller. Some systems require memory allocated in a library to be deallocated inside that library in which case \fBraptor_free_memory\fP may be used. .IP "\fBint raptor_uri_is_file_uri(const unsigned char* \fIuri_string\fB)\fR Returns non-zero if the given URI string represents a filename, is a file: URI. .SH "URI CLASS IMPLEMENTATION" .IP "\fBvoid raptor_uri_set_handler(raptor_uri_handler *\fIhandler\fB, void *\fIcontext\fB)\fR Change the URI class implementation to the functions provided by the \fIhandler\fR URI implementation. The \fIcontext\fR user data is passed in to the handler URI implementation calls. .IP "\fBvoid raptor_uri_get_handler(raptor_uri_handler **\fIhandler\fB, void **\fIcontext\fB)\fR Return the current raptor URI class implementation \fIhandler\fR and \fIcontext\fR .SH "WWW CLASS" This is a small wrapper class around existing WWW libraries in order to provide HTTP GET or better URI retrieval for Raptor. It is not intended to be a general purpose WWW retrieval interface. .SH "WWW CLASS INITIALISATION AND CLEANUP" .IP "\fBvoid raptor_www_init(void)\fR" .IP "\fBvoid raptor_www_finish(void)\fR" Initialise or terminate the raptor_www infrastructure. raptor_www_init and raptor_finish are called by raptor_init and raptor_finish respecitively, otherwise must be called once each. .IP NOTE Several of the WWW library implementations require once-only initialisation and termination functions to be called, however raptor cannot determine whether this is already done before the library is initialised in \fBraptor_www_init\fR or terminated in \fBraptor_www_finish\fR, so always performs it. This can be changed by \fBraptor_www_no_www_library_init_finish\fR. .IP "\fBvoid raptor_www_no_www_library_init_finish(void)\fR" If this is called before \fBraptor_www_init\fR, it will not call the underlying WWW library global initialise or terminate functions. The application code must perform both operations. .IP For example with curl, after this function is called, neither \fBcurl_global_init\fR nor \fBcurl_global_cleanup\fR will be called during \fBraptor_www_init\fR or \fBraptor_www_finish\fR respectively. .SH "WWW CONSTRUCTORS" .IP "\fBraptor_www *raptor_www_new(void)\fR" .IP "\fBraptor_www *raptor_www_new_with_connection(void* \fIconnection\fB)\fR" Create a raptor WWW object capable of URI retrieval. If \fIconnection\fR is given, it must match the connection object of the underlying WWW implementation. At present, this is only for libcurl, and allows you to re-use an existing curl handle, or use one which has been set up with some desired qualities. .SH "WWW DESTRUCTOR" .IP "\fBvoid raptor_www_free(raptor_www *\fIwww\fB)\fR" Destroy a raptor WWW object. .SH "WWW METHODS" .IP "\fBvoid raptor_www_set_user_agent(raptor_www *\fIwww\fB, const char *\fIuser_agent\fB)\fR" Set the user agent, for HTTP requests typically. .IP "\fBvoid raptor_www_set_proxy(raptor_www *\fIwww\fB, const char *\fIproxy\fB)\fR" Set the HTTP proxy - usually a string of the form http://server:port .IP "\fBraptor_www_set_write_bytes_handler(raptor_www *\fIwww\fB, raptor_www_write_bytes_handler \fIhandler\fB, void *\fIuser_data\fB)\fR" Set the handler to receive bytes written by the raptor_www implementation. .IP "\fBvoid raptor_www_set_content_type_handler(raptor_www *\fIwww\fB, raptor_www_content_type_handler \fIhandler\fB, void *\fIuser_data\fB)\fR" Set the handler to receive the HTTP Content-Type value, when/if discovered during retrieval by the raptor_www implementation. .IP "\fBvoid raptor_www_set_http_accept(raptor_www *\fIwww\fP, const char *\fIvalue\fP); Set the WWW HTTP Accept: header to \fIvalue\fP. If \fIvalue\fP is NULL, an empty header is sent. .IP "\fBvoid raptor_www_set_error_handler(raptor_www *www\fB, raptor_message_handler \fIerror_handler\fB, void *\fIerror_data\fB)\fR" Set the error handler routine for the raptor_www class. This takes the same arguments as the raptor_parser error, warning handler methods. .IP "\fBvoid* raptor_www_get_connection(raptor_www *\fIwww\fB)\fR" Return the underlying WWW library connection object. For example, for libcurl this is the curl_handle. .SH "WWW ACTION METHODS" .IP "\fBint raptor_www_fetch(raptor_www *www, raptor_uri *uri)\fR" Retrieve the given URL, returning non zero on failure. .IP "\fBvoid raptor_www_abort(raptor_www *www, const char *reason)\fR" Abort an ongoing raptor WWW operation. Typically used within one of the raptor WWW handlers. .SH "QNAME CLASS" This is a class for handling XML QNames consisting of the pair of (a URI from a namespace, a local name) along with an optional value -- useful for XML attributes. This is used with the raptor_namespace_stack and raptor_namespace classes to handle a stack of raptor_namespace that build on raptor_qname. .SH "QNAME CONSTRUCTORS" There are two constructors for raptor_qname to build qnames with optional values on a stack of names. .IP "\fBraptor_qname* raptor_new_qname(raptor_namespace_stack *\fInstack\fB, const unsigned char *\fIname\fB, const unsigned char *\fIvalue\fB, raptor_simple_message_handler \fIerror_handler\fB, void *\fIerror_data\fB)" Create a raptor QName \fIname\fR (a possibly :-separated name) with name to be resolved against the given \fInstack\fR namespace stack. An optional \fIvalue\fR can be given, and if there is an error, the \fIerror_handler\fB and \fIerror_data\fR will be used to invoke the callback. .IP "\fBraptor_qname* raptor_new_qname_from_namespace_local_name (raptor_namespace *\fIns\fB, const unsigned char *\fIlocal_name\fB, const unsigned char *\fIvalue\fB)" Create a raptor QName using the namespace name of the raptor_namespace \fIns\fR and the local name \fIlocal_name\fR, along with optional value \fIvalue\fR. Errors are reported using the error handling and data of the namespace. .SH "QNAME DESTRUCTOR" .IP "\fBvoid raptor_free_qname(raptor_qname* \fIname\fB)\fR" Destroy a raptor qname object .SH "QNAME METHODS" .IP "\fBint raptor_qname_equal(raptor_qname *\fIname1\fR, raptor_qname *\fIname2\fB)\fR" Return non-zero if the given QNames are equal. .SH "QNAME UTILITY FUNCTIONS" .IP "\fBraptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *\fInstack\fB, const unsigned char *\fIname\fB, size_t \fIname_len\fB, raptor_simple_message_handler \fIerror_handler\fB, void *\fIerror_data\fB)\fR" Return the URI corresponding to the QName according to the RDF method; concatenating the namespace's name (URI) with the local name. Takes the same arguments as \fBraptor_new_qname\fR but does not create a raptor_qname object. .SH "NAMESPACE CLASS" An XML namespace class - each entry is on a stack and consists of a name (URI) and prefix. The prefix or the name but not both may be empty. If the prefix is empty, it defines the default prefix. If the name is empty, it undefines the given prefix. .SH "NAMESPACE CONSTRUCTOR" .IP "\fBraptor_namespace* raptor_new_namespace(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth)\fR" Create a raptor_namespace object on the given namespace stack \fInstack\fR with prefix \fIprefix\fR and namespace name (URI string) \fIns_uri_string\fR. If \fIprefix\fR is NULL, it defines the URI for the default namespace prefix. If the \fIns_uri_string\fR is NULL, it undefines the given \fIprefix\fR in the current scope. Both may not be NULL. \fIdepth\fR signifies the position of the namespace on the stack; 0 is the bottom of the stack and generally the first depth for user namespace declarations. Namespaces declared on the same depth (such as on the same XML element, typically) can be handily freed with \fIraptor_namespaces_end_for_depth\fR method on the namespace stack class. .SH "NAMESPACE DESTRUCTOR" .IP "\fBvoid raptor_free_namespace(raptor_namespace *ns)\fR" Destroy a raptor namespace object. .SH "NAMESPACE METHODS" .IP "\fBraptor_uri* raptor_namespace_get_uri(const raptor_namespace *ns)\fR" Return the namespace name (URI) of the namespace. .IP "\fBconst unsigned char* raptor_namespace_get_prefix(const raptor_namespace *ns)\fR" Return the prefix of the namespace. .IP "\fBunsigned char *raptor_namespaces_format(const raptor_namespace *ns, size_t *length_p)\fR" Format the namespace as a string and return it as a new string, returning the length of the resulting string in \fIlength_p\fR if it is not NULL. The string format is suitable for emitting in XML to declare the namespace. .SH "NAMESPACE UTILITY FUNCTIONS" .IP "\fBint raptor_namespace_copy(raptor_namespace_stack *nstack, raptor_namespace *ns, int new_depth)\fR" Copy the namespace from the current stack to the new one, \fInstack\fR at depth \fInew_depth\fR. .SH "NAMESPACE STACK CLASS" A stack of raptor_namespace objects where the namespaces on top of the stack have wider scope and override earlier (lower) namespace declarations. Intended to match the XML namespace declaring semantics using xmlns attributes. .SH "NAMESPACE STACK CONSTRUCTORS" .IP "\fBraptor_namespace_stack* raptor_new_namespaces(raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults)\fR" .IP "\fBvoid raptor_namespaces_init(raptor_namespace_stack *nstack, raptor_uri_handler *handler, void *context, raptor_simple_message_handler error_handler, void *error_data, int defaults)\fR" Create or initialise a new raptor_namespace_stack object with the given URI and error handlers. \fBraptor_namespaces_new\fR allocates new memory for the namespace stack and \fBraptor_namespaces_init\fR initialises an existing declared \fInstack\fR, which could be statically allocated. Note that \fBraptor_uri_get_handler\fR can be useful to return the current raptor URI handler/context. The \fIdefaults\fR argument describes which default namespaces are declared in the empty stack. At present, 0 is none, 1 for just the XML namespace and 2 is for a typical set of namespaces used for RDF, RDFS, Dublin Core, OWL, ... that may vary over time. .SH "NAMESPACE STACK DESTRUCTORS" .IP "\fBvoid raptor_free_namespaces(raptor_namespace_stack *nstack)\fR" Destroy a namespace stack object, freeing the \fInstack\fR (goes with \fBraptor_new_namespaces\fR). .IP "\fBvoid raptor_namespaces_clear(raptor_namespace_stack *nstack)\fR" Clear a statically allocated namespace stack; does not free the \fInstack\fR. (goes with \fBraptor_namespaces_init\fR). .SH "NAMESPACE STACK METHODS" .IP "\fBvoid raptor_namespaces_start_namespace(raptor_namespace_stack *nstack, raptor_namespace *nspace)\fR" Start the given \fInspace\fR on the stack, at the depth already defined. .IP "\fBint raptor_namespaces_start_namespace_full(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *nspace, int depth)\fR" Create a new raptor_namespace and start it on the stack. See \fBraptor_new_namespace\fR for the meaning of the argumens. .IP "\fBvoid raptor_namespaces_end_for_depth(raptor_namespace_stack *nstack, int depth)\fR" End (and free) all namespaces on the stack at the given \fIdepth\fR. .IP "\fBraptor_namespace* raptor_namespaces_get_default_namespace (raptor_namespace_stack *nstack)\fR" Return the current default raptor_namespace of the namespace stack or NULL if there is none. .IP "\fBraptor_namespace *raptor_namespaces_find_namespace (raptor_namespace_stack *nstack, const unsigned char *prefix, int prefix_length)\fR" Find the first namespace on the stack with the given namespace \fIprefix\fR or NULL if there is none. .IP "\fBint raptor_namespaces_namespace_in_scope(raptor_namespace_stack *nstack, const raptor_namespace *nspace)\fR" Return non-zero if the raptor_namespace \fInspace\fR is declared on the stack; i.e. in scope if this is a stack of XML namespaces. .SH "SEQUENCE CLASS" A class for ordered sequences of items, adding at either end of the sequence. The method names should be familiar to Perl users. .SH "SEQUENCE CONSTRUCTOR" .IP "\fBraptor_sequence* raptor_new_sequence(raptor_sequence_free_handler* \fIfree_handler\fP, raptor_sequence_print_handler* \fIprint_handler\fP)\fR" Create a new empty sequence, with optional handler for freeing elements (as used by \fBraptor_free_sequence\fP and printing out elements (used by \fBraptor_sequence_print\fP). .SH "SEQUENCE DESTRUCTOR" .IP "\fBvoid raptor_free_sequence(raptor_sequence* \fIseq\fP)\fR" Destoy a sequence object, freeing any items if the free handler was defined in the constructor. .SH "SEQUENCE METHODS" .IP "\fBint raptor_sequence_size(raptor_sequence* \fIseq\fP)\fR" Return the number of items in the sequence. .IP "\fBint raptor_sequence_set_at(raptor_sequence* \fIseq\fP, int \fIidx\fP, void *data)\fR" Set the sequence item at index \fIidx\fP to the value \fIdata\fP, extending it if necessary. .IP "\fBint raptor_sequence_push(raptor_sequence* \fIseq\fP, void *\fIdata\fP)\fR" Add item \fIdata\fP to the end of the sequence. .IP "\fBint raptor_sequence_shift(raptor_sequence* \fIseq\fP, void *\fIdata\fP)\fR" Add item \fIdata\fP to the start of the sequence. .IP "\fBvoid* raptor_sequence_get_at(raptor_sequence* \fIseq\fP, int \fIidx\fP)\fR" Get the sequence item at index \fIidx\fP or NULL if no such index exists. .IP "\fBvoid* raptor_sequence_pop(raptor_sequence* \fIseq\fP)\fR" Remove and return an item from the end of the sequence, or NULL if is empty. .IP "\fBvoid* raptor_sequence_unshift(raptor_sequence* \fIseq\fP)\fR" Remove and return an item from the start of the sequence, or NULL if is empty. .IP "\fBvoid raptor_sequence_sort(raptor_sequence* \fIseq\fP, int(*\fIcompare\fP)(const void *, const void *))\fR" Sort the sequence using the given comparison function \fIcompare\fP which is passed to qsort(3) internally. .IP "\fBint raptor_compare_strings(const void *\fIa\fP, const void *\fIb\fP)\fR" Helper function useful with \fBraptor_sequence_sort\fP. .IP "\fBvoid raptor_sequence_set_print_handler(raptor_sequence *\fIseq\fP, raptor_sequence_print_handler *\fIprint_handler\fP)\fR" Set the print handler for the sequence, an alternative to setting it in the constructor. .IP "\fBvoid raptor_sequence_print_string(char *\fIdata\fP, FILE *\fIfh\fP)\fR" Helper print handler function useful for printing out sequences of strings. .IP "\fBvoid raptor_sequence_print_uri(char *\fIdata\fP, FILE *\fIfh\fP)\fR" Helper print handler function useful for printing out sequences of raptor_uri* objects. .IP "\fBvoid raptor_sequence_print(raptor_sequence* \fIseq\fP, FILE* \fIfh\fP)\fR" Print out the sequence in a debug format to the given file handler \fIfh\fP. NOTE: The exact format is not guaranteed to remain the same between releases. .SH "STRINGBUFFER CLASS" A class for growing strings, small chunks at a time. .SH "STRINGBUFFER CONSTRUCTOR" .IP "\fBraptor_stringbuffer* raptor_new_stringbuffer(void)\fR" Create a new stringbuffer. .SH "STRINGBUFFER DESTRUCTOR" .IP "\fBvoid raptor_free_stringbuffer(raptor_stringbuffer* \fIstringbuffer\fP)\fR" Destroy a stringbuffer. .SH "STRINGBUFFER METHODS" .IP "\fBint raptor_stringbuffer_append_counted_string(raptor_stringbuffer* \fIstringbuffer\fP, const unsigned char *\fIstring\fP, size_t \fIlength\fP, int \fIdo_copy\fP)\fR" Append a \fIstring\fP of \fIlength\fP bytes to a stringbuffer, copying it only if \fIdo_copy\fP is non-0. .IP "\fBint raptor_stringbuffer_append_string(raptor_stringbuffer* \fIstringbuffer\fP, const unsigned char* \fIstring\fP, int \fIdo_copy\fP)\fR" Append a \fIstring\fP to a stringbuffer, copying it only if \fIdo_copy\fP is non-0. .IP "\fBint raptor_stringbuffer_append_decimal(raptor_stringbuffer* \fIstringbuffer\fP, int \fIinteger\fP)\fR" Append a formatted decimal \fIinteger\fP to a stringbuffer. .IP "\fBint raptor_stringbuffer_append_stringbuffer(raptor_stringbuffer* \fIstringbuffer\fP, raptor_stringbuffer* \fIappend\fP)\fR" Append a stringbuffer \fIappend\fP to a stringbuffer. The append stringbuffer is emptied but not destroyed. .IP "\fBint raptor_stringbuffer_prepend_counted_string(raptor_stringbuffer* \fIstringbuffer\fP, const unsigned char* \fIstring\fP, size_t \fIlength\fP, int \fIdo_copy\fP)\fR" Prepend a \fIstring\fP of \fIlength\fP bytes to the start of a stringbuffer, copying it only if \fIdo_copy\fP is non-0. .IP "\fBint raptor_stringbuffer_prepend_string(raptor_stringbuffer* \fIstringbuffer\fP, const unsigned char* \fIstring\fP, int \fIdo_copy\fP)\fR" Prepend a \fIstring\fP to the start of a stringbuffer, copying it only if \fIdo_copy\fP is non-0. .IP "\fBunsigned char * raptor_stringbuffer_as_string(raptor_stringbuffer* \fIstringbuffer\fP)\fR" Return the stringbuffer as a single string. The string is shared and should be copied if needed. .IP "\fBsize_t raptor_stringbuffer_length(raptor_stringbuffer* \fIstringbuffer\fP)\fR" Return the length of the stringbuffer. .SH API CHANGES .SS 1.3.2 Added raptor_alloc_memory to allocate memory inside the library. .SS 1.3.1 Correct raptor_print_statement declaration argument statement to have one less 'const', to match the code. .SS 1.3.0 Added the following parser methods, utility methods and helper functions: .br \fBraptor_new_parser_for_content (Parser class constructor)\fR, \fBraptor_get_mime_type\fR, \fBraptor_get_feature\fR, \fBraptor_syntax_name_check\fR, \fBraptor_guess_parser_name\fR, \fBraptor_features_enumerate\fR, \fBraptor_feature_from_uri\fR, \fBraptor_www_set_http_accept (WWW class)\fR. .LP Changed \fBraptor_set_feature\fP to now return an int success or failure. .LP Added the following functions: .br \fBraptor_free_memory\fR, \fBraptor_unicode_char_to_utf8\fR, \fBraptor_utf8_to_unicode_char\fR and \fBraptor_vsnprintf\fR. .LP Added the raptor_sequence class, its constructor, destructor, methods and helper functions. .LP Added the raptor_stringbuffer class and constructor, destructor and methods. .LP Deprecated \fBraptor_print_statement_detailed\fR always intended to be internal. .SS 1.2.0 Added \fBraptor_syntaxes_enumerate\fR to get full information on syntax mime type and URIs as well as name and label. .br N-Triples Plus parser renamed to Turtle (name turtle) .SS 1.1.0 Added N-Triples Plus parser (name ntriples-plus) .br Made URI class constructors, methods and factory methods as well as some other utility functions using or returning URIs or literals take unsigned char* rather than char*. The affected calls are: .br \fBraptor_new_uri_func\fR, \fBraptor_new_uri_from_local_name_func\fR, \fBraptor_new_uri_relative_to_base_func\fR, \fBraptor_uri_as_string_func\fR, \fBraptor_uri_as_counted_string_func\fR : URI factory methods changed to all take/return unsigned char* for URI strings. \fBraptor_statement_part_as_counted_string\fR, \fBraptor_statement_part_as_string\fR, \fBraptor_new_uri\fR, \fBraptor_new_uri_from_uri_local_name\fR, \fBraptor_new_uri_relative_to_base\fR, \fBraptor_uri_as_string\fR, \fBraptor_uri_as_counted_string\fR, \fBraptor_print_ntriples_string\fR : Constructors and methods changed to take/return unsigned char* for URI strings. \fBraptor_uri_resolve_uri_reference\fR, \fBraptor_uri_filename_to_uri_string\fR, \fBraptor_uri_uri_string_to_filename\fR, \fBraptor_uri_uri_string_to_filename_fragment\fR, \fBraptor_uri_is_file_uri\fR : Changed to use unsigned char* for URI strings, char* for filenames, \fBraptor_ntriples_string_as_utf8_string\fR : Changed to return unsigned char* for UTF8 string. .br Added \fBraptor_parsers_enumerate\fR to discover supported parsers. .br Added \fBraptor_uri_uri_string_to_filename_fragment\fR with fragment arg to return the URI fragment. .br Made the raptor_namespace, raptor_namespace_stack and raptor_qname class and APIs public. .br Added feature non_nfc_fatal (see raptor_set_feature documentation). .SS 1.0.0 Removed the following deprecated methods and functions (see 0.9.6 changes for the new names): .br \fBraptor_free\fR, \fBraptor_new\fR, \fBraptor_ntriples_free\fR, \fBraptor_ntriples_new\fR, \fBraptor_ntriples_parse_file\fR, \fBraptor_ntriples_set_error_handler\fR, \fBraptor_ntriples_set_fatal_error_handler\fR, \fBraptor_ntriples_set_statement_handler\fR and \fBraptor_parser_abort\fR. .br Added \fBraptor_parse_file_stream\fR for reading FILE* streams without necessarily having a file. .SS 0.9.12 Added \fBraptor_new_uri_for_retrieval\fR to turn URI references into URIs suitable for retrieval (no fragments). .SS 0.9.11 Added \fBraptor_get_name\fR and \fBraptor_get_label\fR. .br \fBraptor_xml_escape_string\fR now takes error message handler, data pointer, loses parser argument. .br Added \fBraptor_set_default_generate_id_parameters\fR and \fBraptor_set_generate_id_handler\fR to control the default generation of IDs, allow full customisation. .SS 0.9.10 Added \fBraptor_set_parser_strict\fR and \fBraptor_www_no_www_library_init_finish\fR. .br \fBraptor_xml_escape_string\fR now takes an output string length pointer. .br Added \fBraptor_statement_part_as_counted_string\fR, \fBraptor_statement_part_as_string and \fBraptor_parse_abort\fR. .br Deprecated \fBraptor_parser_abort\fR. .SS 0.9.9 Added raptor_www class and all its constructors, destructor, methods, calls. .br Added \fBraptor_parse_uri\fR, \fBraptor_parser_abort\fR, \fBraptor_ntriples_term_as_string\fR and \fBraptor_xml_escape_string\fR. .SS 0.9.7 \fBraptor_parse_chunk, \fBraptor_new_uri_from_id\fR, arguments are now unsigned char. .br Added \fBraptor_new_uri_for_xmlbase\fR. .SS 0.9.6 In this version, the raptor/ntriples parser calling APIs were modified. The following table lists the changes: .ta \w'raptor_ntriples_set_fatal_error_handler 'u+\n(Spu .LP \fIOLD API NEW API (0.9.6+)\fR .br \fBraptor_new()\fR \fBraptor_new_parser("rdfxml")\fR .br \fBntriples_new()\fR \fBraptor_new_parser("ntriples")\fR .br \fBraptor_free\fR \fBraptor_free_parser\fR .br \fBntriples_free\fR \fBraptor_ntriples_parser\fR .br \fBraptor_ntriples_parse_file\fR \fBraptor_parse_file\fR .br \fBraptor_ntriples_set_error_handler\fR \fBraptor_set_error_handler\fR .br \fBraptor_ntriples_set_fatal_error_handler\fR \fBraptor_set_fatal_error_handler\fR .br \fBraptor_ntriples_set_statement_handler\fR \fBraptor_set_statement_handler\fR .br .SH "CONFORMING TO" \fIRDF/XML Syntax (Revised)\fR, Dave Beckett (ed.) W3C Recommendation, .UR http://www.w3.org/TR/rdf-syntax-grammar/ http://www.w3.org/TR/rdf-syntax-grammar/ .UE \fIN-Triples\fR, in \fIRDF Test Cases\fR, Jan Grant and Dave Beckett (eds.) W3C Recommendation, .UR http://www.w3.org/TR/rdf-testcases/#ntriples http://www.w3.org/TR/rdf-testcases/#ntriples .UE \fITurtle - Terse RDF Triple Language\fR, Dave Beckett, .UR http://www.ilrt.bristol.ac.uk/discovery/2004/01/turtle/ http://www.ilrt.bristol.ac.uk/discovery/2004/01/turtle/ .UE .SH SEE ALSO .BR rapper (1), raptor-config (1) .SH AUTHOR Dave Beckett - .UR http://purl.org/net/dajobe/ http://purl.org/net/dajobe/ .UE .br .UR Institute for Learning and Research Technology (ILRT) http://www.ilrt.bristol.ac.uk/ .UE .br .UR University of Bristol http://www.bristol.ac.uk/ .UE