raptor.h | raptor.h | |||
---|---|---|---|---|
/* -*- Mode: c; c-basic-offset: 2 -*- | /* -*- Mode: c; c-basic-offset: 2 -*- | |||
* | * | |||
* raptor.h - Redland Parser Toolkit for RDF (Raptor) interfaces and defini tion | * raptor.h - Redland Parser Toolkit for RDF (Raptor) interfaces and defini tion | |||
* | * | |||
* $Id: raptor.h,v 1.190 2005/11/22 15:53:29 dajobe Exp $ | * Copyright (C) 2000-2006, David Beckett http://purl.org/net/dajobe/ | |||
* | * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac | |||
* Copyright (C) 2000-2005, David Beckett http://purl.org/net/dajobe/ | .uk/ | |||
* Institute for Learning and Research Technology http://www.ilrt.bristol.a | ||||
c.uk/ | ||||
* University of Bristol, UK http://www.bristol.ac.uk/ | ||||
* | * | |||
* This package is Free Software and part of Redland http://librdf.org/ | * This package is Free Software and part of Redland http://librdf.org/ | |||
* | * | |||
* It is licensed under the following three licenses as alternatives: | * It is licensed under the following three licenses as alternatives: | |||
* 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version | * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version | |||
* 2. GNU General Public License (GPL) V2 or any newer version | * 2. GNU General Public License (GPL) V2 or any newer version | |||
* 3. Apache License, V2.0 or any newer version | * 3. Apache License, V2.0 or any newer version | |||
* | * | |||
* You may not use this file except in compliance with at least one of | * You may not use this file except in compliance with at least one of | |||
* the above three licenses. | * the above three licenses. | |||
skipping to change at line 40 | skipping to change at line 37 | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
#include <stdio.h> | #include <stdio.h> | |||
/* Required for va_list in raptor_vsnprintf */ | /* Required for va_list in raptor_vsnprintf */ | |||
#include <stdarg.h> | #include <stdarg.h> | |||
/** | ||||
* RAPTOR_API: | ||||
* | ||||
* Macro for wrapping API function call declarations. | ||||
* | ||||
*/ | ||||
#ifdef WIN32 | #ifdef WIN32 | |||
# ifdef RAPTOR_STATIC | # ifdef RAPTOR_STATIC | |||
# define RAPTOR_API | # define RAPTOR_API | |||
# else | # else | |||
# ifdef RAPTOR_INTERNAL | # ifdef RAPTOR_INTERNAL | |||
# define RAPTOR_API _declspec(dllexport) | # define RAPTOR_API _declspec(dllexport) | |||
# else | # else | |||
# define RAPTOR_API _declspec(dllimport) | # define RAPTOR_API _declspec(dllimport) | |||
# endif | # endif | |||
# endif | # endif | |||
skipping to change at line 68 | skipping to change at line 71 | |||
#ifdef __APPLE_CC__ | #ifdef __APPLE_CC__ | |||
/* OSX gcc cpp-precomp is broken */ | /* OSX gcc cpp-precomp is broken */ | |||
#define RAPTOR_DEPRECATED | #define RAPTOR_DEPRECATED | |||
#else | #else | |||
#define RAPTOR_DEPRECATED __attribute__((deprecated)) | #define RAPTOR_DEPRECATED __attribute__((deprecated)) | |||
#endif | #endif | |||
#else | #else | |||
#define RAPTOR_DEPRECATED | #define RAPTOR_DEPRECATED | |||
#endif | #endif | |||
/** | ||||
* raptor_uri: | ||||
* | ||||
* Raptor URI Class. | ||||
*/ | ||||
typedef void* raptor_uri; | typedef void* raptor_uri; | |||
/* Public statics */ | /* Public statics */ | |||
RAPTOR_API | RAPTOR_API | |||
extern const char * const raptor_short_copyright_string; | extern const char * const raptor_short_copyright_string; | |||
RAPTOR_API | RAPTOR_API | |||
extern const char * const raptor_copyright_string; | extern const char * const raptor_copyright_string; | |||
RAPTOR_API | RAPTOR_API | |||
extern const char * const raptor_version_string; | extern const char * const raptor_version_string; | |||
RAPTOR_API | RAPTOR_API | |||
skipping to change at line 107 | skipping to change at line 115 | |||
/** | /** | |||
* raptor_rdf_namespace_uri_len: | * raptor_rdf_namespace_uri_len: | |||
* | * | |||
* Length of #raptor_rdf_namespace_uri string | * Length of #raptor_rdf_namespace_uri string | |||
*/ | */ | |||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned int raptor_rdf_namespace_uri_len; | extern const unsigned int raptor_rdf_namespace_uri_len; | |||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned char * const raptor_xml_literal_datatype_uri_string; | extern const unsigned char * const raptor_xml_literal_datatype_uri_string; | |||
/** | ||||
* raptor_xml_literal_datatype_uri_string_len: | ||||
* | ||||
* Length of #raptor_xml_literal_datatype_uri_string | ||||
*/ | ||||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned int raptor_xml_literal_datatype_uri_string_len; | extern const unsigned int raptor_xml_literal_datatype_uri_string_len; | |||
/* Public structure */ | /* Public structure */ | |||
/** | ||||
* raptor_parser: | ||||
* | ||||
* Raptor Parser class | ||||
*/ | ||||
typedef struct raptor_parser_s raptor_parser; | typedef struct raptor_parser_s raptor_parser; | |||
/** | ||||
* raptor_serializer: | ||||
* | ||||
* Raptor Serializer class | ||||
*/ | ||||
typedef struct raptor_serializer_s raptor_serializer; | typedef struct raptor_serializer_s raptor_serializer; | |||
/** | ||||
* raptor_www: | ||||
* | ||||
* Raptor WWW class | ||||
*/ | ||||
typedef struct raptor_www_s raptor_www; | typedef struct raptor_www_s raptor_www; | |||
/** | ||||
* raptor_iostream: | ||||
* | ||||
* Raptor I/O Stream class | ||||
*/ | ||||
typedef struct raptor_iostream_s raptor_iostream; | typedef struct raptor_iostream_s raptor_iostream; | |||
/** | ||||
* raptor_xml_element: | ||||
* | ||||
* Raptor XML Element class | ||||
*/ | ||||
typedef struct raptor_xml_element_s raptor_xml_element; | typedef struct raptor_xml_element_s raptor_xml_element; | |||
/** | ||||
* raptor_xml_writer: | ||||
* | ||||
* Raptor XML Writer class | ||||
*/ | ||||
typedef struct raptor_xml_writer_s raptor_xml_writer; | typedef struct raptor_xml_writer_s raptor_xml_writer; | |||
/** | ||||
* raptor_qname: | ||||
* | ||||
* Raptor XML qname class | ||||
*/ | ||||
typedef struct raptor_qname_s raptor_qname; | typedef struct raptor_qname_s raptor_qname; | |||
/** | ||||
* raptor_namespace: | ||||
* | ||||
* Raptor XML Namespace class | ||||
*/ | ||||
typedef struct raptor_namespace_s raptor_namespace; | typedef struct raptor_namespace_s raptor_namespace; | |||
/** | ||||
* raptor_namespace_stack: | ||||
* | ||||
* Raptor XML Namespace Stack class | ||||
*/ | ||||
typedef struct raptor_namespace_stack_s raptor_namespace_stack; | typedef struct raptor_namespace_stack_s raptor_namespace_stack; | |||
/** | /** | |||
* raptor_ntriples_parser: | * raptor_ntriples_parser: | |||
* | * | |||
* @Deprecated: use #raptor_parser. | * @Deprecated: use #raptor_parser. | |||
* | * | |||
* old structure - use #raptor_parser instead. | * old structure - use #raptor_parser instead. | |||
*/ | */ | |||
typedef raptor_parser raptor_ntriples_parser; | typedef raptor_parser raptor_ntriples_parser; | |||
skipping to change at line 323 | skipping to change at line 380 | |||
raptor_uri *uri; | raptor_uri *uri; | |||
raptor_uri_source uri_source; | raptor_uri_source uri_source; | |||
const unsigned char *id; | const unsigned char *id; | |||
int ordinal; | int ordinal; | |||
int is_malloced; | int is_malloced; | |||
const unsigned char *literal; | const unsigned char *literal; | |||
raptor_uri *literal_datatype; | raptor_uri *literal_datatype; | |||
const unsigned char *literal_language; | const unsigned char *literal_language; | |||
} raptor_identifier; | } raptor_identifier; | |||
/* Returned by statement_handler */ | /** | |||
* raptor_statement: | ||||
* @subject: triple subject data | ||||
* @subject_type: triple subject type | ||||
* @predicate: triple predicate data | ||||
* @predicate_type: triple predicate type | ||||
* @object: triple object literal string | ||||
* @object_type: triple object type | ||||
* @object_literal_datatype: triple object literal datatype URI (or NULL) | ||||
* @object_literal_language: triple object literal language string (or NULL | ||||
) | ||||
* | ||||
* An RDF triple | ||||
* | ||||
* See #raptor_identifier for a description of how the fields may be used. | ||||
* As returned by a parser statement_handler. | ||||
*/ | ||||
typedef struct { | typedef struct { | |||
const void *subject; | const void *subject; | |||
raptor_identifier_type subject_type; | raptor_identifier_type subject_type; | |||
const void *predicate; | const void *predicate; | |||
raptor_identifier_type predicate_type; | raptor_identifier_type predicate_type; | |||
const void *object; | const void *object; | |||
raptor_identifier_type object_type; | raptor_identifier_type object_type; | |||
raptor_uri *object_literal_datatype; | raptor_uri *object_literal_datatype; | |||
const unsigned char *object_literal_language; | const unsigned char *object_literal_language; | |||
} raptor_statement; | } raptor_statement; | |||
skipping to change at line 670 | skipping to change at line 742 | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_set_feature(raptor_parser *parser, raptor_feature feature, int v alue); | int raptor_set_feature(raptor_parser *parser, raptor_feature feature, int v alue); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_parser_set_feature_string(raptor_parser *parser, raptor_feature feature, const unsigned char *value); | int raptor_parser_set_feature_string(raptor_parser *parser, raptor_feature feature, const unsigned char *value); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_get_feature(raptor_parser *parser, raptor_feature feature); | int raptor_get_feature(raptor_parser *parser, raptor_feature feature); | |||
RAPTOR_API | RAPTOR_API | |||
const unsigned char* raptor_parser_get_feature_string(raptor_parser *parser , raptor_feature feature); | const unsigned char* raptor_parser_get_feature_string(raptor_parser *parser , raptor_feature feature); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_strict); | void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_strict); | |||
RAPTOR_API | ||||
const char* raptor_parser_get_accept_header(raptor_parser* rdf_parser); | ||||
/* Get serializer names */ | /* Get serializer names */ | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serializers_enumerate(const unsigned int counter, const char **n ame, const char **label, const char **mime_type, const unsigned char **uri_ string); | int raptor_serializers_enumerate(const unsigned int counter, const char **n ame, const char **label, const char **mime_type, const unsigned char **uri_ string); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serializer_syntax_name_check(const char *name); | int raptor_serializer_syntax_name_check(const char *name); | |||
/* Serializing */ | /* Serializing */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_serializer* raptor_new_serializer(const char *name); | raptor_serializer* raptor_new_serializer(const char *name); | |||
skipping to change at line 694 | skipping to change at line 768 | |||
int raptor_serialize_start(raptor_serializer *rdf_serializer, raptor_uri *u ri, raptor_iostream *iostream); | int raptor_serialize_start(raptor_serializer *rdf_serializer, raptor_uri *u ri, raptor_iostream *iostream); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serialize_start_to_filename(raptor_serializer *rdf_serializer, c onst char *filename); | int raptor_serialize_start_to_filename(raptor_serializer *rdf_serializer, c onst char *filename); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serialize_start_to_string(raptor_serializer *rdf_serializer, rap tor_uri *uri, void **string_p, size_t *length_p); | int raptor_serialize_start_to_string(raptor_serializer *rdf_serializer, rap tor_uri *uri, void **string_p, size_t *length_p); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serialize_start_to_file_handle(raptor_serializer *rdf_serializer , raptor_uri *uri, FILE *fh); | int raptor_serialize_start_to_file_handle(raptor_serializer *rdf_serializer , raptor_uri *uri, FILE *fh); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serialize_set_namespace(raptor_serializer* rdf_serializer, rapto r_uri *uri, const unsigned char *prefix); | int raptor_serialize_set_namespace(raptor_serializer* rdf_serializer, rapto r_uri *uri, const unsigned char *prefix); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serialize_set_namespace_from_namespace(raptor_serializer* rdf_se | ||||
rializer, raptor_namespace *nspace); | ||||
RAPTOR_API | ||||
int raptor_serialize_statement(raptor_serializer* rdf_serializer, const rap tor_statement *statement); | int raptor_serialize_statement(raptor_serializer* rdf_serializer, const rap tor_statement *statement); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serialize_end(raptor_serializer *rdf_serializer); | int raptor_serialize_end(raptor_serializer *rdf_serializer); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_iostream* raptor_serializer_get_iostream(raptor_serializer *serializ er); | raptor_iostream* raptor_serializer_get_iostream(raptor_serializer *serializ er); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_serializer_set_error_handler(raptor_serializer* serializer, voi d *user_data, raptor_message_handler handler); | void raptor_serializer_set_error_handler(raptor_serializer* serializer, voi d *user_data, raptor_message_handler handler); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_serializer_set_warning_handler(raptor_serializer* serializer, v oid *user_data, raptor_message_handler handler); | void raptor_serializer_set_warning_handler(raptor_serializer* serializer, v oid *user_data, raptor_message_handler handler); | |||
RAPTOR_API | RAPTOR_API | |||
skipping to change at line 798 | skipping to change at line 874 | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_uri_resolve_uri_reference(const unsigned char *base_uri, const unsigned char *reference_uri, unsigned char* buffer, size_t length); | void raptor_uri_resolve_uri_reference(const unsigned char *base_uri, const unsigned char *reference_uri, unsigned char* buffer, size_t length); | |||
/* raptor_uri.c */ | /* raptor_uri.c */ | |||
RAPTOR_API | RAPTOR_API | |||
unsigned char *raptor_uri_filename_to_uri_string(const char *filename); | unsigned char *raptor_uri_filename_to_uri_string(const char *filename); | |||
RAPTOR_API | RAPTOR_API | |||
char *raptor_uri_uri_string_to_filename(const unsigned char *uri_string); | char *raptor_uri_uri_string_to_filename(const unsigned char *uri_string); | |||
RAPTOR_API | RAPTOR_API | |||
char *raptor_uri_uri_string_to_filename_fragment(const unsigned char *uri_s tring, unsigned char **fragment_p); | char *raptor_uri_uri_string_to_filename_fragment(const unsigned char *uri_s tring, unsigned char **fragment_p); | |||
RAPTOR_API | RAPTOR_API RAPTOR_DEPRECATED | |||
int raptor_uri_is_file_uri(const unsigned char* uri_string); | int raptor_uri_is_file_uri(const unsigned char* uri_string); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_uri_uri_string_is_file_uri(const unsigned char* uri_string); | ||||
RAPTOR_API | ||||
unsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri *base_u ri, raptor_uri *reference_uri, size_t *length_p); | unsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri *base_u ri, raptor_uri *reference_uri, size_t *length_p); | |||
RAPTOR_API | RAPTOR_API | |||
unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *base_uri, rap tor_uri *reference_uri); | unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *base_uri, rap tor_uri *reference_uri); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_uri_print(const raptor_uri* uri, FILE *stream); | void raptor_uri_print(const raptor_uri* uri, FILE *stream); | |||
RAPTOR_API | RAPTOR_API | |||
unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p) ; | unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p) ; | |||
RAPTOR_API | RAPTOR_API | |||
unsigned char* raptor_uri_to_string(raptor_uri *uri); | unsigned char* raptor_uri_to_string(raptor_uri *uri); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_uri_set_handler(raptor_uri_handler *handler, void *context); | void raptor_uri_set_handler(const raptor_uri_handler *handler, void *contex t); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_uri_get_handler(raptor_uri_handler **handler, void **context); | void raptor_uri_get_handler(raptor_uri_handler **handler, void **context); | |||
/** | /** | |||
* RAPTOR_RDF_MS_URI: | * RAPTOR_RDF_MS_URI: | |||
* | * | |||
* RDF Namespace URI (rdf:). | * RDF Namespace URI (rdf:). | |||
* | * | |||
* Copy with raptor_uri_copy() to use. | * Copy with raptor_uri_copy() to use. | |||
*/ | */ | |||
#define RAPTOR_RDF_MS_URI raptor_rdf_namespace_uri | #define RAPTOR_RDF_MS_URI raptor_rdf_namespace_uri | |||
/** | /** | |||
* RAPTOR_RDF_sCHEMA_URI: | * RAPTOR_RDF_SCHEMA_URI: | |||
* | * | |||
* RDF Schema Namespace URI (rdfs:). | * RDF Schema Namespace URI (rdfs:). | |||
* | * | |||
* Copy with raptor_uri_copy() to use. | * Copy with raptor_uri_copy() to use. | |||
*/ | */ | |||
#define RAPTOR_RDF_SCHEMA_URI raptor_rdf_schema_namespace_uri | #define RAPTOR_RDF_SCHEMA_URI raptor_rdf_schema_namespace_uri | |||
/** | /** | |||
* RAPTOR_XML_sCHEMA_DATATYPES_URI: | * RAPTOR_XMLSCHEMA_DATATYPES_URI: | |||
* | * | |||
* XML Schema Datatypes URI (xsd:). | * XML Schema Datatypes URI (xsd:). | |||
* | * | |||
* Copy with raptor_uri_copy() to use. | * Copy with raptor_uri_copy() to use. | |||
*/ | */ | |||
#define RAPTOR_XMLSCHEMA_DATATYPES_URI raptor_xmlschema_datatypes_namespace _uri | #define RAPTOR_XMLSCHEMA_DATATYPES_URI raptor_xmlschema_datatypes_namespace _uri | |||
/** | /** | |||
* RAPTOR_OWL_URI: | * RAPTOR_OWL_URI: | |||
* | * | |||
skipping to change at line 904 | skipping to change at line 982 | |||
raptor_qname* raptor_qname_copy(raptor_qname *qname); | raptor_qname* raptor_qname_copy(raptor_qname *qname); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_qname(raptor_qname* name); | void raptor_free_qname(raptor_qname* name); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_qname_equal(raptor_qname *name1, raptor_qname *name2); | int raptor_qname_equal(raptor_qname *name1, raptor_qname *name2); | |||
/* utility function */ | /* utility function */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, con st unsigned char *name, size_t name_len, raptor_simple_message_handler erro r_handler, void *error_data); | raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, con st unsigned char *name, size_t name_len, raptor_simple_message_handler erro r_handler, void *error_data); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_qname(raptor_iostream* iostr, raptor_qname *qname ); | int raptor_iostream_write_qname(raptor_iostream* iostr, raptor_qname *qname ); | |||
RAPTOR_API | ||||
const raptor_namespace* raptor_qname_get_namespace(raptor_qname* name); | ||||
/* raptor_namespace_stack - stack of XML namespaces */ | /* raptor_namespace_stack - stack of XML namespaces */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_namespace* raptor_new_namespace_from_uri(raptor_namespace_stack *nst ack, const unsigned char *prefix, raptor_uri* ns_uri, int depth); | raptor_namespace* raptor_new_namespace_from_uri(raptor_namespace_stack *nst ack, const unsigned char *prefix, raptor_uri* ns_uri, int depth); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_namespace_stack* raptor_new_namespaces(raptor_uri_handler *uri_handl er, void *uri_context, raptor_simple_message_handler error_handler, void *e rror_data, int defaults); | raptor_namespace_stack* raptor_new_namespaces(raptor_uri_handler *uri_handl er, void *uri_context, raptor_simple_message_handler error_handler, void *e rror_data, int defaults); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_namespaces_init(raptor_namespace_stack *nstack, raptor_uri_hand ler *uri_handler, void *uri_context, raptor_simple_message_handler error_ha ndler, void *error_data, int defaults); | void raptor_namespaces_init(raptor_namespace_stack *nstack, raptor_uri_hand ler *uri_handler, void *uri_context, raptor_simple_message_handler error_ha ndler, void *error_data, int defaults); | |||
RAPTOR_API | RAPTOR_API | |||
skipping to change at line 931 | skipping to change at line 1011 | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_namespaces_end_for_depth(raptor_namespace_stack *nstack, int de pth); | void raptor_namespaces_end_for_depth(raptor_namespace_stack *nstack, int de pth); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_namespace* raptor_namespaces_get_default_namespace(raptor_namespace_ stack *nstack); | raptor_namespace* raptor_namespaces_get_default_namespace(raptor_namespace_ stack *nstack); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_namespace *raptor_namespaces_find_namespace(raptor_namespace_stack * nstack, const unsigned char *prefix, int prefix_length); | raptor_namespace *raptor_namespaces_find_namespace(raptor_namespace_stack * nstack, const unsigned char *prefix, int prefix_length); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_namespace* raptor_namespaces_find_namespace_by_uri(raptor_namespace_ stack *nstack, raptor_uri *ns_uri); | raptor_namespace* raptor_namespaces_find_namespace_by_uri(raptor_namespace_ stack *nstack, raptor_uri *ns_uri); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_namespaces_namespace_in_scope(raptor_namespace_stack *nstack, co nst raptor_namespace *nspace); | int raptor_namespaces_namespace_in_scope(raptor_namespace_stack *nstack, co nst raptor_namespace *nspace); | |||
raptor_qname* raptor_namespaces_qname_from_uri(raptor_namespace_stack *nsta ck, raptor_uri *uri, int xml_version); | ||||
/* raptor_namespace - XML namespace */ | /* raptor_namespace - XML namespace */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_namespace* raptor_new_namespace(raptor_namespace_stack *nstack, cons t unsigned char *prefix, const unsigned char *ns_uri_string, int depth); | raptor_namespace* raptor_new_namespace(raptor_namespace_stack *nstack, cons t unsigned char *prefix, const unsigned char *ns_uri_string, int depth); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_namespace(raptor_namespace *ns); | void raptor_free_namespace(raptor_namespace *ns); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_namespace_copy(raptor_namespace_stack *nstack, raptor_namespace *ns, int new_depth); | int raptor_namespace_copy(raptor_namespace_stack *nstack, raptor_namespace *ns, int new_depth); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_uri* raptor_namespace_get_uri(const raptor_namespace *ns); | raptor_uri* raptor_namespace_get_uri(const raptor_namespace *ns); | |||
RAPTOR_API | RAPTOR_API | |||
const unsigned char* raptor_namespace_get_prefix(const raptor_namespace *ns ); | const unsigned char* raptor_namespace_get_prefix(const raptor_namespace *ns ); | |||
RAPTOR_API | RAPTOR_API | |||
const unsigned char* raptor_namespace_get_counted_prefix(const raptor_names | ||||
pace *ns, size_t *length_p); | ||||
RAPTOR_API | ||||
unsigned char *raptor_namespaces_format(const raptor_namespace *ns, size_t *length_p); | unsigned char *raptor_namespaces_format(const raptor_namespace *ns, size_t *length_p); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_namespace(raptor_iostream* iostr, raptor_namespac e *ns); | int raptor_iostream_write_namespace(raptor_iostream* iostr, raptor_namespac e *ns); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_new_namespace_parts_from_string(const unsigned char *string, uns igned char **prefix, unsigned char **uri_string); | int raptor_new_namespace_parts_from_string(const unsigned char *string, uns igned char **prefix, unsigned char **uri_string); | |||
/** | ||||
* raptor_stringbuffer: | ||||
* | ||||
* Raptor string buffer class | ||||
*/ | ||||
typedef struct raptor_stringbuffer_s raptor_stringbuffer; | typedef struct raptor_stringbuffer_s raptor_stringbuffer; | |||
/* Sequence class */ | /* Sequence class */ | |||
/** | ||||
* raptor_sequence: | ||||
* | ||||
* Raptor sequence class | ||||
*/ | ||||
typedef struct raptor_sequence_s raptor_sequence; | typedef struct raptor_sequence_s raptor_sequence; | |||
/** | /** | |||
* raptor_sequence_free_handler: | * raptor_sequence_free_handler: | |||
* @object: object to free | * @object: object to free | |||
* | * | |||
* Handler function for freeing a sequence item. | * Handler function for freeing a sequence item. | |||
* | * | |||
* Set by raptor_new_sequence(). | * Set by raptor_new_sequence(). | |||
*/ | */ | |||
skipping to change at line 1127 | skipping to change at line 1220 | |||
*/ | */ | |||
typedef struct { | typedef struct { | |||
raptor_iostream_init_func init; | raptor_iostream_init_func init; | |||
raptor_iostream_finish_func finish; | raptor_iostream_finish_func finish; | |||
raptor_iostream_write_byte_func write_byte; | raptor_iostream_write_byte_func write_byte; | |||
raptor_iostream_write_bytes_func write_bytes; | raptor_iostream_write_bytes_func write_bytes; | |||
raptor_iostream_write_end_func write_end; | raptor_iostream_write_end_func write_end; | |||
} raptor_iostream_handler; | } raptor_iostream_handler; | |||
RAPTOR_API | RAPTOR_API | |||
raptor_iostream* raptor_new_iostream_from_handler(void *context, raptor_ios tream_handler *handler); | raptor_iostream* raptor_new_iostream_from_handler(void *context, const rapt or_iostream_handler *handler); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_iostream* raptor_new_iostream_to_sink(void); | raptor_iostream* raptor_new_iostream_to_sink(void); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_iostream* raptor_new_iostream_to_filename(const char *filename); | raptor_iostream* raptor_new_iostream_to_filename(const char *filename); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_iostream* raptor_new_iostream_to_file_handle(FILE *handle); | raptor_iostream* raptor_new_iostream_to_file_handle(FILE *handle); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_iostream* raptor_new_iostream_to_string(void **string_p, size_t *len gth_p, void *(*malloc_handler)(size_t size)); | raptor_iostream* raptor_new_iostream_to_string(void **string_p, size_t *len gth_p, void *(*malloc_handler)(size_t size)); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_iostream(raptor_iostream *iostr); | void raptor_free_iostream(raptor_iostream *iostr); | |||
skipping to change at line 1156 | skipping to change at line 1249 | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_counted_string(raptor_iostream *iostr, const void *string, size_t len); | int raptor_iostream_write_counted_string(raptor_iostream *iostr, const void *string, size_t len); | |||
RAPTOR_API | RAPTOR_API | |||
size_t raptor_iostream_get_bytes_written_count(raptor_iostream *iostr); | size_t raptor_iostream_get_bytes_written_count(raptor_iostream *iostr); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_decimal(raptor_iostream* iostr, int integer); | int raptor_iostream_write_decimal(raptor_iostream* iostr, int integer); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_format_hexadecimal(raptor_iostream* iostr, unsigned int integer, int width); | int raptor_iostream_format_hexadecimal(raptor_iostream* iostr, unsigned int integer, int width); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_stringbuffer(raptor_iostream* iostr, raptor_strin gbuffer *sb); | int raptor_iostream_write_stringbuffer(raptor_iostream* iostr, raptor_strin gbuffer *sb); | |||
RAPTOR_API | ||||
int raptor_iostream_write_uri(raptor_iostream *iostr, raptor_uri *uri); | ||||
/* Parser and Serializer features */ | /* Parser and Serializer features */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_feature raptor_feature_from_uri(raptor_uri *uri); | raptor_feature raptor_feature_from_uri(raptor_uri *uri); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_feature_value_type(const raptor_feature feature); | int raptor_feature_value_type(const raptor_feature feature); | |||
/* SAX2 element Class (raptor_xml_element) */ | /* SAX2 element Class (raptor_xml_element) */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_xml_element* raptor_new_xml_element(raptor_qname* name, const unsign ed char* xml_language, raptor_uri* xml_base); | raptor_xml_element* raptor_new_xml_element(raptor_qname* name, const unsign ed char* xml_language, raptor_uri* xml_base); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_xml_element(raptor_xml_element *element); | void raptor_free_xml_element(raptor_xml_element *element); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_qname* raptor_xml_element_get_name(raptor_xml_element *xml_element); | raptor_qname* raptor_xml_element_get_name(raptor_xml_element *xml_element); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_element_set_attributes(raptor_xml_element* xml_element, rap tor_qname **attributes, int count); | void raptor_xml_element_set_attributes(raptor_xml_element* xml_element, rap tor_qname **attributes, int count); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_element_declare_namespace(raptor_xml_element* xml_element, | raptor_qname** raptor_xml_element_get_attributes(raptor_xml_element* xml_el | |||
raptor_namespace *nspace); | ement); | |||
RAPTOR_API | ||||
int raptor_xml_element_get_attributes_count(raptor_xml_element* xml_element | ||||
); | ||||
RAPTOR_API | ||||
int raptor_xml_element_declare_namespace(raptor_xml_element* xml_element, r | ||||
aptor_namespace *nspace); | ||||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_xml_element(raptor_iostream *iostr, raptor_xml_el ement *element, raptor_namespace_stack *nstack, int is_empty, int is_end, r aptor_simple_message_handler error_handler, void *error_data, int depth); | int raptor_iostream_write_xml_element(raptor_iostream *iostr, raptor_xml_el ement *element, raptor_namespace_stack *nstack, int is_empty, int is_end, r aptor_simple_message_handler error_handler, void *error_data, int depth); | |||
RAPTOR_API | ||||
int raptor_xml_element_is_empty(raptor_xml_element* xml_element); | ||||
/* XML Writer Class (raptor_xml_writer) */ | /* XML Writer Class (raptor_xml_writer) */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_xml_writer* raptor_new_xml_writer(raptor_namespace_stack *nstack, ra ptor_uri_handler *uri_handler, void *uri_context, raptor_iostream* iostr, r aptor_simple_message_handler error_handler, void *error_data, int canonical ize); | raptor_xml_writer* raptor_new_xml_writer(raptor_namespace_stack *nstack, ra ptor_uri_handler *uri_handler, void *uri_context, raptor_iostream* iostr, r aptor_simple_message_handler error_handler, void *error_data, int canonical ize); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_xml_writer(raptor_xml_writer* xml_writer); | void raptor_free_xml_writer(raptor_xml_writer* xml_writer); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_writer_empty_element(raptor_xml_writer* xml_writer, raptor_ xml_element *element); | void raptor_xml_writer_empty_element(raptor_xml_writer* xml_writer, raptor_ xml_element *element); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_writer_start_element(raptor_xml_writer* xml_writer, raptor_ xml_element *element); | void raptor_xml_writer_start_element(raptor_xml_writer* xml_writer, raptor_ xml_element *element); | |||
End of changes. 30 change blocks. | ||||
16 lines changed or deleted | 122 lines changed or added | |||