Skip to main content

Module callbacks

Module callbacks 

Source
Expand description

C ABI callback function type definitions — matching upstream callback signatures (§14, §20).

This module defines all function pointer types used in public upstream structures: SAX1 callbacks, SAX2 callbacks, error callbacks, validity callbacks, XPath callbacks, I/O callbacks, resource loader callbacks, encoding callbacks, and the SAX locator.

§Phase 1 status

Complete — all callback types from upstream headers are defined.

§Safety

All callback types are unsafe extern "C" because they are called across the FFI boundary with C calling conventions. The caller must ensure:

  • Function pointers are non-null before invocation (unless nullable per upstream contract)
  • Pointers passed to callbacks remain valid for the callback’s duration
  • Callbacks observe the upstream ownership/lifetime contract
  • Thread safety matches upstream expectations

Structs§

_xmlSAXLocator
The SAX locator structure providing line/column information.

Type Aliases§

attributeDeclSAXFunc
Callback for attribute declaration.
cdataBlockSAXFunc
Callback for CDATA block.
charactersSAXFunc
Callback for character data.
commentSAXFunc
Callback for comments.
elementDeclSAXFunc
Callback for element declaration.
endDocumentSAXFunc
Callback for document end.
endElementNsSAX2Func
Callback for element end (SAX2/namespaced).
endElementSAXFunc
Callback for element end (SAX1).
entityDeclSAXFunc
Callback for entity declaration.
errorSAXFunc
Callback for errors (printf-style, variadic at C call site).
externalSubsetSAXFunc
Callback for external subset notification.
fatalErrorSAXFunc
Callback for fatal errors (printf-style, variadic at C call site).
getEntitySAXFunc
Callback to get an entity.
getParameterEntitySAXFunc
Callback to get a parameter entity.
hasExternalSubsetSAXFunc
Callback: does the document have an external subset?
hasInternalSubsetSAXFunc
Callback: does the document have an internal subset?
ignorableWhitespaceSAXFunc
Callback for ignorable whitespace.
initSAXFunc
Callback for initializing the SAX handler.
internalSubsetSAXFunc
Callback for internal DTD subset notification.
isStandaloneSAXFunc
Callback for standalone document declaration.
notationDeclSAXFunc
Callback for notation declaration.
processingInstructionSAXFunc
Callback for processing instructions.
referenceSAXFunc
Callback for entity reference.
resolveEntitySAXFunc
Callback to resolve an external entity.
setDocumentLocatorSAXFunc
Callback to set the document locator.
startDocumentSAXFunc
Callback for document start.
startElementNsSAX2Func
Callback for element start (SAX2/namespaced).
startElementSAXFunc
Callback for element start (SAX1).
unparsedEntityDeclSAXFunc
Callback for unparsed entity declaration.
warningSAXFunc
Callback for warnings (printf-style, variadic at C call site).
xmlCatalogPreferFunc
Catalog preference callback.
xmlCharEncConvImpl
Character encoding conversion implementation.
xmlCharEncodingInputFunc
Character encoding input conversion function.
xmlCharEncodingOutputFunc
Character encoding output conversion function.
xmlFreeFunc
Free function type for allocator hooks.
xmlGenericErrorFunc
Generic error handler callback (printf-style, variadic at C call site).
xmlHashCopier
Copier function for hash table entries.
xmlHashDeallocator
Deallocator function for hash table entries.
xmlHashScanner
Scanner function for hash table entries.
xmlHashScannerFull
Full scanner function for hash table entries.
xmlInputCloseCallback
Close callback for custom input.
xmlInputReadCallback
Read callback for custom input.
xmlMallocFunc
Malloc function type for allocator hooks.
xmlModuleRegisterFunc
Module register/unregister callback.
xmlOutputCloseCallback
Close callback for custom output.
xmlOutputWriteCallback
Write callback for custom output.
xmlReallocFunc
Realloc function type for allocator hooks.
xmlResourceLoader
Resource loader callback.
xmlSAXLocatorPtr
Pointer to a SAX locator.
xmlStrdupFunc
Strdup function type for allocator hooks.
xmlStreamCtxtPtr
Stream callback for pattern matching.
xmlStructuredErrorFunc
Structured error handler callback.
xmlValidityErrorFunc
Validity error handler callback (printf-style, variadic at C call site).
xmlValidityWarningFunc
Validity warning handler callback (printf-style, variadic at C call site).
xmlXPathFuncLookupFunc
Function lookup function for XPath extensions.
xmlXPathVariableLookupFunc
Variable lookup function for XPath.