| Raptor RDF Syntax Parsing and Serializing Library Manual | ||||
|---|---|---|---|---|
enum raptor_feature; unsigned int raptor_get_feature_count (void); int raptor_features_enumerate (const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); raptor_feature raptor_feature_from_uri (raptor_uri *uri); int raptor_feature_value_type (const raptor_feature feature);
Optional parameters for raptor_parser and raptor_serializer objects that can be get and set. Utility functions also exist to enumerate them, their description and the parameter type taken.
typedef enum {
RAPTOR_FEATURE_SCANNING,
RAPTOR_FEATURE_ASSUME_IS_RDF,
RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES,
RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES,
RAPTOR_FEATURE_ALLOW_BAGID,
RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST,
RAPTOR_FEATURE_NORMALIZE_LANGUAGE,
RAPTOR_FEATURE_NON_NFC_FATAL,
RAPTOR_FEATURE_WARN_OTHER_PARSETYPES,
RAPTOR_FEATURE_CHECK_RDF_ID,
RAPTOR_FEATURE_RELATIVE_URIS,
RAPTOR_FEATURE_START_URI,
RAPTOR_FEATURE_WRITER_AUTO_INDENT,
RAPTOR_FEATURE_WRITER_AUTO_EMPTY,
RAPTOR_FEATURE_WRITER_INDENT_WIDTH,
RAPTOR_FEATURE_WRITER_XML_VERSION,
RAPTOR_FEATURE_WRITER_XML_DECLARATION,
RAPTOR_FEATURE_NO_NET,
RAPTOR_FEATURE_RESOURCE_BORDER,
RAPTOR_FEATURE_LITERAL_BORDER,
RAPTOR_FEATURE_BNODE_BORDER,
RAPTOR_FEATURE_RESOURCE_FILL,
RAPTOR_FEATURE_LITERAL_FILL,
RAPTOR_FEATURE_BNODE_FILL,
RAPTOR_FEATURE_HTML_TAG_SOUP,
RAPTOR_FEATURE_MICROFORMATS,
RAPTOR_FEATURE_HTML_LINK,
RAPTOR_FEATURE_WWW_TIMEOUT,
RAPTOR_FEATURE_WRITE_BASE_URI,
RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL,
RAPTOR_FEATURE_WWW_HTTP_USER_AGENT,
RAPTOR_FEATURE_JSON_CALLBACK,
RAPTOR_FEATURE_JSON_EXTRA_DATA,
RAPTOR_FEATURE_RSS_TRIPLES,
RAPTOR_FEATURE_ATOM_ENTRY_URI,
RAPTOR_FEATURE_LAST=RAPTOR_FEATURE_ATOM_ENTRY_URI
} raptor_feature;
Raptor parser, serializer or XML writer features.
| 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 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. | |
| 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. | |
| Set the start URI for serlalizing to use. | |
| 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. | |
| 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. | |
| Internal |
unsigned int raptor_get_feature_count (void);
Get the count of features defined.
This is prefered to the compile time-only symbol RAPTOR_FEATURE_LAST and returns a count of the number of features which is RAPTOR_FEATURE_LAST+1.
Returns : |
count of features in the raptor_feature enumeration |
int raptor_features_enumerate (const raptor_feature feature, const char **name, raptor_uri **uri, const char **label);
Get list of syntax features.
If uri is not NULL, a pointer toa new raptor_uri is returned
that must be freed by the caller with raptor_free_uri().
|
feature enumeration (0+) |
|
pointer to store feature short name (or NULL) |
|
pointer to store feature URI (or NULL) |
|
pointer to feature label (or NULL) |
Returns : |
0 on success, <0 on failure, >0 if feature is unknown |
raptor_feature raptor_feature_from_uri (raptor_uri *uri);
Turn a feature URI into an feature enum.
The allowed feature URIs are available via raptor_features_enumerate().
|
feature URI |
Returns : |
< 0 if the feature is unknown |
int raptor_feature_value_type (const raptor_feature feature);
Get the type of a features.
The type of the feature is 0=integer , 1=string. Other values are
undefined. Most features are integer values and use
raptor_set_feature and raptor_get_feature()
( raptor_serializer_set_feature raptor_serializer_get_feature() )
String value features use raptor_parser_set_feature_string() and
raptor_parser_get_feature_string()
( raptor_serializer_set_feature_string()
and raptor_serializer_get_feature_string() )
|
raptor serializer or parser feature |
Returns : |
the type of the feature or <0 if feature is unknown
|