|  |  |  | 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_LAST=RAPTOR_FEATURE_NO_NET
} raptor_feature;
Raptor parser, serializer or XML writer features.
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: | feature enumeration (0+) | 
| name: | pointer to store feature short name (or NULL) | 
| uri: | pointer to store feature URI (or NULL) | 
| label: | 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().
| uri: | 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() )
| feature: | raptor serializer or parser feature | 
| Returns : | the type of the feature or <0 if featureis unknown |