![]() |
![]() |
![]() |
Raptor RDF Syntax Library Manual | ![]() |
---|---|---|---|---|
Top | Description |
enum raptor_option; raptor_option_description; unsigned int raptor_option_get_count (void
); enum raptor_option_value_type; const char * raptor_option_get_value_type_label (const raptor_option_value_type type
); raptor_option_description * raptor_world_get_option_description (raptor_world *world
,const raptor_domain domain
,const raptor_option option
); void raptor_free_option_description (raptor_option_description *option_description
); raptor_option raptor_world_get_option_from_uri (raptor_world *world
,raptor_uri *uri
);
Options for several classes such as raptor_parser, raptor_serializer raptor_sax2 and raptor_xml_writer that can be get and set. Utility functions exist to enumerate them, their description and the parameter type taken.
typedef enum { RAPTOR_OPTION_SCANNING, RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES, RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES, RAPTOR_OPTION_ALLOW_BAGID, RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST, RAPTOR_OPTION_NORMALIZE_LANGUAGE, RAPTOR_OPTION_NON_NFC_FATAL, RAPTOR_OPTION_WARN_OTHER_PARSETYPES, RAPTOR_OPTION_CHECK_RDF_ID, RAPTOR_OPTION_RELATIVE_URIS, RAPTOR_OPTION_WRITER_AUTO_INDENT, RAPTOR_OPTION_WRITER_AUTO_EMPTY, RAPTOR_OPTION_WRITER_INDENT_WIDTH, RAPTOR_OPTION_WRITER_XML_VERSION, RAPTOR_OPTION_WRITER_XML_DECLARATION, RAPTOR_OPTION_NO_NET, RAPTOR_OPTION_RESOURCE_BORDER, RAPTOR_OPTION_LITERAL_BORDER, RAPTOR_OPTION_BNODE_BORDER, RAPTOR_OPTION_RESOURCE_FILL, RAPTOR_OPTION_LITERAL_FILL, RAPTOR_OPTION_BNODE_FILL, RAPTOR_OPTION_HTML_TAG_SOUP, RAPTOR_OPTION_MICROFORMATS, RAPTOR_OPTION_HTML_LINK, RAPTOR_OPTION_WWW_TIMEOUT, RAPTOR_OPTION_WRITE_BASE_URI, RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL, RAPTOR_OPTION_WWW_HTTP_USER_AGENT, RAPTOR_OPTION_JSON_CALLBACK, RAPTOR_OPTION_JSON_EXTRA_DATA, RAPTOR_OPTION_RSS_TRIPLES, RAPTOR_OPTION_ATOM_ENTRY_URI, RAPTOR_OPTION_PREFIX_ELEMENTS, RAPTOR_OPTION_STRICT, RAPTOR_OPTION_WWW_CERT_FILENAME, RAPTOR_OPTION_WWW_CERT_TYPE, RAPTOR_OPTION_WWW_CERT_PASSPHRASE, RAPTOR_OPTION_NO_FILE, RAPTOR_OPTION_WWW_SSL_VERIFY_PEER, RAPTOR_OPTION_WWW_SSL_VERIFY_HOST, RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES, RAPTOR_OPTION_LAST = RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES } raptor_option;
Raptor parser, serializer or XML writer options.
If true (default false), 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. | |
If 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. | |
If 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. | |
If 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. | |
If 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. | |
If true (default true) then XML language values such as from xml:lang will be normalized to lowercase. | |
If true (default false) then illegal Unicode Normal Form C in literals will give a fatal error, otherwise just a warning. | |
If true (default true) then the RDF/XML parser will warn about unknown rdf:parseType values. | |
If true (default true) then the RDF/XML will check rdf:ID attribute values for duplicates and cause an error if any are found. | |
If true (default true) then relative URIs will be used wherever possible when serializing. | |
Automatically indent elements when seriailizing. | |
Automatically detect and abbreviate empty elements when serializing. | |
Integer number of spaces to use for each indent level when serializing with auto indent. | |
Integer XML version XML 1.0 (10) or XML 1.1 (11) | |
Write XML 1.0 or 1.1 declaration. | |
Deny network requests inside other requests. | |
Border color of resource nodes for GraphViz DOT serializer. | |
Border color of literal nodes for GraphViz DOT serializer. | |
Border color of blank nodes for GraphViz DOT serializer. | |
Fill color of resource nodes for GraphViz DOT serializer. | |
Fill color of literal nodes for GraphViz DOT serializer. | |
Fill color of blank nodes for GraphViz DOT serializer. | |
Use a lax HTML parser if an XML parser fails when read HTML for GRDDL parser. | |
Look for microformats for GRDDL parser. | |
Look for head <link> to type rdf/xml for GRDDL parser. | |
Set timeout for internal WWW URI requests for GRDDL parser. | |
Write base directive for Turtle/N3.
|
|
HTTP Cache-Control: header | |
HTTP User-Agent: header | |
JSON serializer callback function. | |
JSON serializer extra top-level data | |
Atom/RSS serializer writes extra RDF triples it finds (none, rdf-xml, atom-triples) | |
Atom entry URI. If given, generate an Atom Entry Document with the item having the given URI, otherwise generate an Atom Feed Document with any items found. | |
Integer. If set, generate Atom/RSS1.0 documents with prefixed elements, otherwise unprefixed. | |
Boolean. If set, operate in strict conformance mode. | |
String. SSL client certificate filename | |
String. SSL client certificate type | |
String. SSL client certificate passphrase | |
Deny file reading requests inside other requests. | |
Integer. SSL verify peer - non-0 to verify peer SSL certificate (default) | |
Integer. SSL verify host - 0 none, 1 CN match, 2 host match (default). Other values are ignored. | |
When reading XML, load external entities. | |
Internal |
typedef struct { raptor_domain domain; raptor_option option; raptor_option_value_type value_type; const char* name; size_t name_len; const char* label; raptor_uri* uri; } raptor_option_description;
Description of an option for a domain.
raptor_domain |
domain ID |
raptor_option |
option ID |
raptor_option_value_type |
data type of option value |
short name for option | |
length of name
|
|
description of option | |
raptor_uri * |
URI identifying option |
unsigned int raptor_option_get_count (void
);
Get the count of options defined.
This is prefered to the compile time-only symbol RAPTOR_OPTION_LAST and returns a count of the number of options which is RAPTOR_OPTION_LAST + 1.
Returns : |
count of options in the raptor_option enumeration |
typedef enum { RAPTOR_OPTION_VALUE_TYPE_BOOL, RAPTOR_OPTION_VALUE_TYPE_INT, RAPTOR_OPTION_VALUE_TYPE_STRING, RAPTOR_OPTION_VALUE_TYPE_URI, RAPTOR_OPTION_VALUE_TYPE_LAST = RAPTOR_OPTION_VALUE_TYPE_URI } raptor_option_value_type;
Option value types.
const char * raptor_option_get_value_type_label (const raptor_option_value_type type
);
Get a label for a value type
|
value type |
Returns : |
label for type or NULL for invalid type |
raptor_option_description * raptor_world_get_option_description (raptor_world *world
,const raptor_domain domain
,const raptor_option option
);
Get a description of an option for a domain.
The returned description must be freed with
raptor_free_option_description()
.
|
raptor world object |
|
domain |
|
option enumeration (0+) |
Returns : |
option description or NULL on failure or if option is unknown |
void raptor_free_option_description (raptor_option_description *option_description
);
Destructor - free an option description object.
|
option description |
raptor_option raptor_world_get_option_from_uri (raptor_world *world
,raptor_uri *uri
);
Get an option ID from a URI
Option URIs are the concatenation of the string "http://feature.librdf.org/raptor-" plus the short name.
They are automatically returned for any option described with
raptor_world_get_option_description()
.
|
raptor_world instance |
|
option URI |
Returns : |
< 0 if the option is unknown or on error |