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§
- _xmlSAX
Locator - The SAX locator structure providing line/column information.
Type Aliases§
- attribute
DeclSAX Func - Callback for attribute declaration.
- cdata
BlockSAX Func - Callback for CDATA block.
- charactersSAX
Func - Callback for character data.
- commentSAX
Func - Callback for comments.
- element
DeclSAX Func - Callback for element declaration.
- endDocumentSAX
Func - Callback for document end.
- endElement
NsSA X2Func - Callback for element end (SAX2/namespaced).
- endElementSAX
Func - Callback for element end (SAX1).
- entity
DeclSAX Func - Callback for entity declaration.
- errorSAX
Func - Callback for errors (printf-style, variadic at C call site).
- external
SubsetSAX Func - Callback for external subset notification.
- fatal
ErrorSAX Func - Callback for fatal errors (printf-style, variadic at C call site).
- getEntitySAX
Func - Callback to get an entity.
- getParameter
EntitySAX Func - Callback to get a parameter entity.
- hasExternal
SubsetSAX Func - Callback: does the document have an external subset?
- hasInternal
SubsetSAX Func - Callback: does the document have an internal subset?
- ignorable
WhitespaceSAX Func - Callback for ignorable whitespace.
- initSAX
Func - Callback for initializing the SAX handler.
- internal
SubsetSAX Func - Callback for internal DTD subset notification.
- isStandaloneSAX
Func - Callback for standalone document declaration.
- notation
DeclSAX Func - Callback for notation declaration.
- processing
InstructionSAX Func - Callback for processing instructions.
- referenceSAX
Func - Callback for entity reference.
- resolve
EntitySAX Func - Callback to resolve an external entity.
- setDocument
LocatorSAX Func - Callback to set the document locator.
- start
DocumentSAX Func - Callback for document start.
- start
Element NsSA X2Func - Callback for element start (SAX2/namespaced).
- start
ElementSAX Func - Callback for element start (SAX1).
- unparsed
Entity DeclSAX Func - Callback for unparsed entity declaration.
- warningSAX
Func - Callback for warnings (printf-style, variadic at C call site).
- xmlCatalog
Prefer Func - Catalog preference callback.
- xmlChar
EncConv Impl - Character encoding conversion implementation.
- xmlChar
Encoding Input Func - Character encoding input conversion function.
- xmlChar
Encoding Output Func - Character encoding output conversion function.
- xmlFree
Func - Free function type for allocator hooks.
- xmlGeneric
Error Func - Generic error handler callback (printf-style, variadic at C call site).
- xmlHash
Copier - Copier function for hash table entries.
- xmlHash
Deallocator - Deallocator function for hash table entries.
- xmlHash
Scanner - Scanner function for hash table entries.
- xmlHash
Scanner Full - Full scanner function for hash table entries.
- xmlInput
Close Callback - Close callback for custom input.
- xmlInput
Read Callback - Read callback for custom input.
- xmlMalloc
Func - Malloc function type for allocator hooks.
- xmlModule
Register Func - Module register/unregister callback.
- xmlOutput
Close Callback - Close callback for custom output.
- xmlOutput
Write Callback - Write callback for custom output.
- xmlRealloc
Func - Realloc function type for allocator hooks.
- xmlResource
Loader - Resource loader callback.
- xmlSAX
Locator Ptr - Pointer to a SAX locator.
- xmlStrdup
Func - Strdup function type for allocator hooks.
- xmlStream
Ctxt Ptr - Stream callback for pattern matching.
- xmlStructured
Error Func - Structured error handler callback.
- xmlValidity
Error Func - Validity error handler callback (printf-style, variadic at C call site).
- xmlValidity
Warning Func - Validity warning handler callback (printf-style, variadic at C call site).
- xmlX
Path Func Lookup Func - Function lookup function for XPath extensions.
- xmlX
Path Variable Lookup Func - Variable lookup function for XPath.