axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
axl_bool axl_dtd_check_entity_ref_and_expand ( axlDtdEntityResolver  resolver,
axlPointer  data,
axlStream stream,
const char *  prefix,
axlError **  error 

Allows to check if the stream contains a reference to a entity, calling the resolver to get the replacement text to be placed.

resolverThe function to be called with the replacement text. This function must return the replacement text or NULL if it fails. Failing to return a reference resolution will make the entity reference to appear as is.
resolverThe entity reference resolver function to be called to solve references found.
dataUser defined data provided to the function, passed directly to the resolver function once executed.
streamThe stream where the entity reference could appear.
prefixThe reference prefix to recognize. Values allowed are: % (DTD references) and & (general entity references).
errorOptional reference to the axlError to report textual diagnostic errors.
The function return axl_false if some error while resolving entity references was found. Otherwise the function return axl_true.

References axl_error_new(), axl_false, axl_free(), AXL_LEVEL_DEBUG, axl_log(), axl_strdup_printf, axl_stream_accept(), axl_stream_free(), axl_stream_get_index(), axl_stream_get_until(), axl_stream_inspect(), axl_stream_move(), axl_stream_push(), and axl_true.