zxsd 0.20.0
Embedded XML Schema validation for C
Loading...
Searching...
No Matches
Data Fields
zxsd_stream_t Struct Reference

Bounded state for the event-driven validator. More...

#include <zxsd.h>

Collaboration diagram for zxsd_stream_t:
Collaboration graph
[legend]

Data Fields

const zxsd_schema_t * schema
 Generated schema being validated.
 
zxsd_result_t result
 Sticky result of the first failed event.
 
size_t depth
 Number of currently open elements.
 
size_t event_offset
 Monotonic event index used in diagnostics.
 
int finished
 Non-zero after a complete root element.
 
zxsd_allocator_t identity_allocator
 Allocator for streamed identity validation.
 
char * identity_xml
 Internal reconstructed XML buffer.
 
size_t identity_xml_length
 Bytes used in identity_xml.
 
size_t identity_xml_capacity
 Allocated reconstructed XML bytes.
 
zxsd_stream_namespace_t namespaces [16u]
 Active QName bindings.
 
size_t namespace_count
 Number of active entries in namespaces.
 
zxsd_stream_model_node_t model_nodes [128u]
 Shared continuation/frontier storage; independent of document length.
 
uint16_t model_free
 First free pool slot, or zero.
 
uint16_t model_high_water
 Highest slot ever allocated; bounds interning scans.
 
int model_pool_initialized
 Whether the lazy free list has been initialized.
 
zxsd_stream_frame_t frames [32u]
 Fixed element stack.
 

Detailed Description

Bounded state for the event-driven validator.

Initialize this object with zxsd_stream_init before sending events. Its storage is bounded by compile-time configuration constants. Identity constraints additionally use the configured allocator. Flat content models use counters. Nested sequences and choices use a shared, bounded continuation pool, including alternative repetition partitions. Zero ZXSD_STREAM_MODEL_CAPACITY selects the bounded history fallback.

Definition at line 571 of file zxsd.h.

Field Documentation

◆ depth

size_t zxsd_stream_t::depth

Number of currently open elements.

Definition at line 574 of file zxsd.h.

◆ event_offset

size_t zxsd_stream_t::event_offset

Monotonic event index used in diagnostics.

Definition at line 575 of file zxsd.h.

◆ finished

int zxsd_stream_t::finished

Non-zero after a complete root element.

Definition at line 576 of file zxsd.h.

◆ frames

zxsd_stream_frame_t zxsd_stream_t::frames[32u]

Fixed element stack.

Definition at line 590 of file zxsd.h.

◆ identity_allocator

zxsd_allocator_t zxsd_stream_t::identity_allocator

Allocator for streamed identity validation.

Definition at line 577 of file zxsd.h.

◆ identity_xml

char* zxsd_stream_t::identity_xml

Internal reconstructed XML buffer.

Definition at line 578 of file zxsd.h.

◆ identity_xml_capacity

size_t zxsd_stream_t::identity_xml_capacity

Allocated reconstructed XML bytes.

Definition at line 580 of file zxsd.h.

◆ identity_xml_length

size_t zxsd_stream_t::identity_xml_length

Bytes used in identity_xml.

Definition at line 579 of file zxsd.h.

◆ model_free

uint16_t zxsd_stream_t::model_free

First free pool slot, or zero.

Definition at line 586 of file zxsd.h.

◆ model_high_water

uint16_t zxsd_stream_t::model_high_water

Highest slot ever allocated; bounds interning scans.

Definition at line 587 of file zxsd.h.

◆ model_nodes

zxsd_stream_model_node_t zxsd_stream_t::model_nodes[128u]

Shared continuation/frontier storage; independent of document length.

Definition at line 585 of file zxsd.h.

◆ model_pool_initialized

int zxsd_stream_t::model_pool_initialized

Whether the lazy free list has been initialized.

Definition at line 588 of file zxsd.h.

◆ namespace_count

size_t zxsd_stream_t::namespace_count

Number of active entries in namespaces.

Definition at line 582 of file zxsd.h.

◆ namespaces

zxsd_stream_namespace_t zxsd_stream_t::namespaces[16u]

Active QName bindings.

Definition at line 581 of file zxsd.h.

◆ result

zxsd_result_t zxsd_stream_t::result

Sticky result of the first failed event.

Definition at line 573 of file zxsd.h.

◆ schema

const zxsd_schema_t* zxsd_stream_t::schema

Generated schema being validated.

Definition at line 572 of file zxsd.h.


The documentation for this struct was generated from the following file: