|
zxsd 0.20.0
Embedded XML Schema validation for C
|
Public API for the zxsd XML validation runtime. More...


Go to the source code of this file.
Data Structures | |
| struct | zxsd_result_t |
| Structured result returned by every generated validator. More... | |
| struct | zxsd_allocator_t |
| Optional allocator used by validation features requiring scratch storage. More... | |
| struct | zxsd_simple_ref_t |
| Reference to a built-in or generated simple type. More... | |
| struct | zxsd_simple |
| Generated descriptor for a restricted, list or union simple type. More... | |
| struct | zxsd_element_t |
| Generated descriptor for an element particle. More... | |
| struct | zxsd_attribute_t |
| Generated descriptor for an XML attribute. More... | |
| struct | zxsd_wildcard_t |
| XML Schema element or attribute wildcard. More... | |
| struct | zxsd_particle |
| Recursive descriptor for a compiled content-model particle. More... | |
| struct | zxsd_complex |
| Generated descriptor for a complex XML Schema type. More... | |
| struct | zxsd_xpath_step_t |
| One expanded-name step in the restricted identity XPath subset. More... | |
| struct | zxsd_xpath |
| Compiled restricted XPath used by identity constraints. More... | |
| struct | zxsd_identity_t |
| Compiled xs:unique, xs:key or xs:keyref descriptor. More... | |
| struct | zxsd_global_element_t |
| Global element declaration available to strict/lax wildcards. More... | |
| struct | zxsd_global_attribute_t |
| Global attribute declaration available to strict/lax wildcards. More... | |
| struct | zxsd_named_type_t |
| Named type entry used to resolve runtime xsi:type values. More... | |
| struct | zxsd_notation_t |
| Global XML Schema notation declaration. More... | |
| struct | zxsd_schema_t |
| Root descriptor consumed by the generic validation runtime. More... | |
| struct | zxsd_stream_model_node_t |
| Internal immutable continuation or frontier entry, for static allocation only. More... | |
| struct | zxsd_stream_frame_t |
| Internal per-element state exposed only to permit static allocation. More... | |
| struct | zxsd_stream_namespace_t |
| Internal namespace binding retained by the event-driven validator. More... | |
| struct | zxsd_stream_t |
| Bounded state for the event-driven validator. More... | |
| struct | zxsd_xml_reader_t |
| Bounded raw-XML reader feeding an event-driven validator. More... | |
| struct | zxsd_runtime_config_t |
| Caller configuration stamp for a same-toolchain runtime boundary. More... | |
Macros | |
| #define | ZXSD_MAX_INPUT (1024u * 1024u) |
| Maximum accepted XML input size, in bytes. | |
| #define | ZXSD_MAX_DEPTH 32u |
| Maximum nesting depth accepted by the embedded XML parser. | |
| #define | ZXSD_MAX_PARTICLES 32u |
| Maximum number of child particles in one complex type. | |
| #define | ZXSD_MAX_ATTRIBUTES 32u |
| Maximum number of attributes in one element. | |
| #define | ZXSD_MAX_NAMESPACES 16u |
| Maximum number of simultaneously active namespace bindings. | |
| #define | ZXSD_MAX_IDENTITY_ROWS 64u |
| Maximum stored tuples per identity constraint. | |
| #define | ZXSD_MAX_IDENTITY_VALUES ZXSD_MAX_IDENTITY_ROWS |
| Maximum identity values, retained as a compatibility alias for rows. | |
| #define | ZXSD_MAX_IDENTITY_TEXT 4096u |
| Maximum total UTF-8 bytes retained for document ID and IDREF values. | |
| #define | ZXSD_MAX_IDENTITY_CONSTRAINTS 16u |
| Maximum identity constraints attached to one root declaration. | |
| #define | ZXSD_MAX_IDENTITY_FIELDS 8u |
| Maximum fields in one identity-constraint tuple. | |
| #define | ZXSD_MAX_XPATH_DEPTH 8u |
| Maximum number of steps in a compiled identity XPath. | |
| #define | ZXSD_MAX_XPATH_ALTERNATIVES 8u |
| Maximum union branches in one compiled identity XPath. | |
| #define | ZXSD_STREAM_TEXT_CAPACITY ZXSD_MAX_TEXT_LENGTH |
| Maximum decoded character data retained for one streamed element. | |
| #define | ZXSD_MAX_TEXT_LENGTH 1024u |
| Maximum lexical length of one element or attribute value. | |
| #define | ZXSD_MAX_PATTERN_LENGTH 4096u |
| Maximum UTF-8 byte length of one generated XSD regular expression. | |
| #define | ZXSD_MAX_REGEX_NODES 512u |
| Maximum parsed expression nodes used by the allocation-free regex engine. | |
| #define | ZXSD_MAX_REGEX_DEPTH 32u |
| Maximum parenthesis and character-class subtraction nesting depth. | |
| #define | ZXSD_MAX_SCHEMA_COMPLEXITY 4096u |
| Maximum aggregate descriptor count accepted by the runtime. | |
| #define | ZXSD_STREAM_NAME_CAPACITY 128u |
| Maximum local-name or namespace-URI length accepted by streaming calls. | |
| #define | ZXSD_STREAM_CHILD_CAPACITY 64u |
| Maximum child tokens retained for a streamed model requiring history. | |
| #define | ZXSD_STREAM_MODEL_CAPACITY 128u |
| Shared continuation/state slots for nested streaming content models. | |
| #define | ZXSD_XML_TOKEN_CAPACITY 4096u |
| Maximum bytes retained for one incomplete XML tag, comment, PI, or CDATA section. | |
| #define | ZXSD_RUNTIME_CONFIG_INIT |
| Initialize a runtime stamp using the including translation unit's configuration. | |
Typedefs | |
| typedef void *(* | zxsd_allocate_fn) (void *context, size_t size) |
| Allocate runtime scratch storage. | |
| typedef void(* | zxsd_deallocate_fn) (void *context, void *pointer) |
| Release runtime scratch storage. | |
| typedef struct zxsd_simple | zxsd_simple_t |
| Generated descriptor for a restricted, list or union simple type. | |
| typedef struct zxsd_particle | zxsd_particle_t |
| Recursive descriptor for a compiled content-model particle. | |
| typedef struct zxsd_complex | zxsd_complex_t |
| Generated descriptor for a complex XML Schema type. | |
| typedef struct zxsd_xpath | zxsd_xpath_t |
| Compiled restricted XPath used by identity constraints. | |
| typedef void(* | zxsd_xml_event_fn) (void *user_data, zxsd_xml_event_t event, const char *namespace_uri, const char *local_name, const char *value, size_t value_length) |
| Observe one decoded event accepted by the incremental validator. | |
Functions | |
| zxsd_result_t | zxsd_check_runtime (const zxsd_runtime_config_t *expected) |
| Check application limits and layouts before using runtime-owned code. | |
| zxsd_result_t | zxsd_validate (const zxsd_schema_t *schema, const char *xml) |
| Validate an XML document against a generated schema descriptor. | |
| zxsd_result_t | zxsd_validate_with_allocator (const zxsd_schema_t *schema, const char *xml, const zxsd_allocator_t *allocator) |
| Validate using an application-provided scratch allocator. | |
| zxsd_result_t | zxsd_stream_init (zxsd_stream_t *stream, const zxsd_schema_t *schema) |
| Initialize an event-driven validation context. | |
| zxsd_result_t | zxsd_stream_init_with_allocator (zxsd_stream_t *stream, const zxsd_schema_t *schema, const zxsd_allocator_t *allocator) |
| Initialize streaming validation with identity-constraint scratch allocation. | |
| void | zxsd_stream_dispose (zxsd_stream_t *stream) |
| Release optional streaming scratch storage. | |
| zxsd_result_t | zxsd_start_element (zxsd_stream_t *stream, const char *namespace_uri, const char *local_name) |
| Begin an element identified by its expanded name. | |
| zxsd_result_t | zxsd_namespace (zxsd_stream_t *stream, const char *prefix, const char *namespace_uri) |
| Add an in-scope namespace declaration to the current start tag. | |
| zxsd_result_t | zxsd_attribute (zxsd_stream_t *stream, const char *namespace_uri, const char *local_name, const char *value) |
| Add an attribute to the current start tag using its expanded name. | |
| zxsd_result_t | zxsd_xsi_type (zxsd_stream_t *stream, const char *type_namespace_uri, const char *type_local_name) |
Apply a namespace-resolved xsi:type to the current element. | |
| zxsd_result_t | zxsd_start_content (zxsd_stream_t *stream) |
| Close the attribute phase of the current start tag. | |
| zxsd_result_t | zxsd_text (zxsd_stream_t *stream, const char *text, size_t length) |
| Supply decoded character data for the current element. | |
| zxsd_result_t | zxsd_end_element (zxsd_stream_t *stream, const char *namespace_uri, const char *local_name) |
| End the current element and check its expanded name and content. | |
| zxsd_result_t | zxsd_stream_finish (zxsd_stream_t *stream) |
| Verify that exactly one complete root element was supplied. | |
| zxsd_result_t | zxsd_xml_reader_init (zxsd_xml_reader_t *reader, const zxsd_schema_t *schema) |
| Initialize a raw, incrementally fed XML validator. | |
| zxsd_result_t | zxsd_xml_reader_init_with_allocator (zxsd_xml_reader_t *reader, const zxsd_schema_t *schema, const zxsd_allocator_t *allocator) |
| Initialize a raw XML reader with identity-constraint scratch allocation. | |
| void | zxsd_xml_reader_set_event_callback (zxsd_xml_reader_t *reader, zxsd_xml_event_fn callback, void *user_data) |
| Install an optional decoded-event observer. | |
| zxsd_result_t | zxsd_xml_reader_feed (zxsd_xml_reader_t *reader, const void *data, size_t length) |
| Feed one arbitrary fragment of an XML document. | |
| zxsd_result_t | zxsd_xml_reader_finish (zxsd_xml_reader_t *reader) |
| Finish an incrementally supplied XML document. | |
| void | zxsd_xml_reader_dispose (zxsd_xml_reader_t *reader) |
| Release optional scratch storage owned by a raw XML reader. | |
| const char * | zxsd_error_string (zxsd_error_t error) |
| Get a stable human-readable description of an error code. | |
Public API for the zxsd XML validation runtime.
Definition in file zxsd.h.