32#define ZXSD_MAX_INPUT (1024u * 1024u)
36#define ZXSD_MAX_DEPTH 32u
38#ifndef ZXSD_MAX_PARTICLES
40#define ZXSD_MAX_PARTICLES 32u
42#if ZXSD_MAX_PARTICLES > 65536u
43#error "ZXSD_MAX_PARTICLES exceeds the 16-bit streaming particle-token space"
45#ifndef ZXSD_MAX_ATTRIBUTES
47#define ZXSD_MAX_ATTRIBUTES 32u
49#ifndef ZXSD_MAX_NAMESPACES
51#define ZXSD_MAX_NAMESPACES 16u
53#ifndef ZXSD_MAX_IDENTITY_ROWS
55#define ZXSD_MAX_IDENTITY_ROWS 64u
57#ifndef ZXSD_MAX_IDENTITY_VALUES
59#define ZXSD_MAX_IDENTITY_VALUES ZXSD_MAX_IDENTITY_ROWS
61#ifndef ZXSD_MAX_IDENTITY_TEXT
63#define ZXSD_MAX_IDENTITY_TEXT 4096u
65#ifndef ZXSD_MAX_IDENTITY_CONSTRAINTS
67#define ZXSD_MAX_IDENTITY_CONSTRAINTS 16u
69#ifndef ZXSD_MAX_IDENTITY_FIELDS
71#define ZXSD_MAX_IDENTITY_FIELDS 8u
73#ifndef ZXSD_MAX_XPATH_DEPTH
75#define ZXSD_MAX_XPATH_DEPTH 8u
77#ifndef ZXSD_MAX_XPATH_ALTERNATIVES
79#define ZXSD_MAX_XPATH_ALTERNATIVES 8u
81#ifndef ZXSD_STREAM_TEXT_CAPACITY
83#define ZXSD_STREAM_TEXT_CAPACITY ZXSD_MAX_TEXT_LENGTH
85#ifndef ZXSD_MAX_TEXT_LENGTH
87#define ZXSD_MAX_TEXT_LENGTH 1024u
89#ifndef ZXSD_MAX_PATTERN_LENGTH
91#define ZXSD_MAX_PATTERN_LENGTH 4096u
93#ifndef ZXSD_MAX_REGEX_NODES
95#define ZXSD_MAX_REGEX_NODES 512u
97#ifndef ZXSD_MAX_REGEX_DEPTH
99#define ZXSD_MAX_REGEX_DEPTH 32u
101#ifndef ZXSD_MAX_SCHEMA_COMPLEXITY
103#define ZXSD_MAX_SCHEMA_COMPLEXITY 4096u
105#ifndef ZXSD_STREAM_NAME_CAPACITY
107#define ZXSD_STREAM_NAME_CAPACITY 128u
109#ifndef ZXSD_STREAM_CHILD_CAPACITY
113#define ZXSD_STREAM_CHILD_CAPACITY 64u
115#ifndef ZXSD_STREAM_MODEL_CAPACITY
121#define ZXSD_STREAM_MODEL_CAPACITY 128u
123#ifndef ZXSD_XML_TOKEN_CAPACITY
125#define ZXSD_XML_TOKEN_CAPACITY 4096u
169typedef void *(*zxsd_allocate_fn)(
void *context,
size_t size);
583#if ZXSD_STREAM_MODEL_CAPACITY > 0
616 const char *namespace_uri,
const char *local_name,
617 const char *value,
size_t value_length);
642#define ZXSD_CONFIG_NO_HEAP 1u
644#define ZXSD_CONFIG_NO_HEAP 0u
664#define ZXSD_RUNTIME_CONFIG_INIT \
666 ZXSD_RUNTIME_ABI_VERSION, ZXSD_DESCRIPTOR_ABI_VERSION, ZXSD_CONFIG_NO_HEAP, \
669 ZXSD_MAX_PARTICLES, \
670 ZXSD_MAX_ATTRIBUTES, \
671 ZXSD_MAX_NAMESPACES, \
672 ZXSD_MAX_IDENTITY_ROWS, \
673 ZXSD_MAX_IDENTITY_VALUES, \
674 ZXSD_MAX_IDENTITY_TEXT, \
675 ZXSD_MAX_IDENTITY_CONSTRAINTS, \
676 ZXSD_MAX_IDENTITY_FIELDS, \
677 ZXSD_MAX_XPATH_DEPTH, \
678 ZXSD_MAX_XPATH_ALTERNATIVES, \
679 ZXSD_STREAM_TEXT_CAPACITY, \
680 ZXSD_MAX_TEXT_LENGTH, \
681 ZXSD_MAX_PATTERN_LENGTH, \
682 ZXSD_MAX_REGEX_NODES, \
683 ZXSD_MAX_REGEX_DEPTH, \
684 ZXSD_MAX_SCHEMA_COMPLEXITY, \
685 ZXSD_STREAM_NAME_CAPACITY, \
686 ZXSD_STREAM_CHILD_CAPACITY, \
687 ZXSD_STREAM_MODEL_CAPACITY, \
688 ZXSD_XML_TOKEN_CAPACITY}, \
690 sizeof(zxsd_stream_t), sizeof(zxsd_stream_frame_t), \
691 sizeof(zxsd_xml_reader_t), sizeof(zxsd_schema_t), \
692 sizeof(zxsd_particle_t), sizeof(zxsd_complex_t), \
693 sizeof(zxsd_simple_t), sizeof(zxsd_result_t), \
694 sizeof(zxsd_allocator_t), sizeof(void *), sizeof(size_t), \
695 sizeof(unsigned long) \
795 const char *local_name);
821 const char *local_name,
const char *value);
833 const char *type_local_name);
865 const char *local_name);
zxsd_result_t zxsd_stream_finish(zxsd_stream_t *stream)
Verify that exactly one complete root element was supplied.
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_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_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.
zxsd_identity_kind_t
Identity-constraint category.
#define ZXSD_STREAM_TEXT_CAPACITY
Maximum decoded character data retained for one streamed element.
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.
struct zxsd_complex zxsd_complex_t
Generated descriptor for a complex XML Schema type.
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.
void(* zxsd_deallocate_fn)(void *context, void *pointer)
Release runtime scratch storage.
struct zxsd_simple zxsd_simple_t
Generated descriptor for a restricted, list or union simple type.
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_error_t
Validation status and error codes.
void *(* zxsd_allocate_fn)(void *context, size_t size)
Allocate runtime scratch storage.
zxsd_whitespace_t
Whitespace treatment prescribed by an XML Schema simple type.
zxsd_simple_variety_t
Variety of an XML Schema simple type.
zxsd_particle_kind_t
Compiled content-model particle kind.
struct zxsd_xpath zxsd_xpath_t
Compiled restricted XPath used by identity constraints.
zxsd_model_t
Complex content model kind.
const char * zxsd_error_string(zxsd_error_t error)
Get a stable human-readable description of an error code.
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.
struct zxsd_particle zxsd_particle_t
Recursive descriptor for a compiled content-model particle.
zxsd_process_t
Wildcard validation behavior.
#define ZXSD_MAX_NAMESPACES
Maximum number of simultaneously active namespace bindings.
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.
#define ZXSD_MAX_DEPTH
Maximum nesting depth accepted by the embedded XML parser.
#define ZXSD_MAX_ATTRIBUTES
Maximum number of attributes in one element.
#define ZXSD_STREAM_CHILD_CAPACITY
Maximum child tokens retained for a streamed model requiring history.
#define ZXSD_STREAM_MODEL_CAPACITY
Shared continuation/state slots for nested streaming content models.
zxsd_xml_event_t
Decoded XML events exposed by the incremental raw-XML reader.
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_xml_reader_init(zxsd_xml_reader_t *reader, const zxsd_schema_t *schema)
Initialize a raw, incrementally fed XML validator.
void zxsd_stream_dispose(zxsd_stream_t *stream)
Release optional streaming scratch storage.
zxsd_result_t zxsd_xml_reader_finish(zxsd_xml_reader_t *reader)
Finish an incrementally supplied XML document.
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_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.
#define ZXSD_STREAM_NAME_CAPACITY
Maximum local-name or namespace-URI length accepted by streaming calls.
zxsd_result_t zxsd_start_content(zxsd_stream_t *stream)
Close the attribute phase of the current start tag.
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.
#define ZXSD_MAX_TEXT_LENGTH
Maximum lexical length of one element or attribute value.
zxsd_result_t zxsd_validate(const zxsd_schema_t *schema, const char *xml)
Validate an XML document against a generated schema descriptor.
#define ZXSD_MAX_PARTICLES
Maximum number of child particles in one complex type.
void zxsd_xml_reader_dispose(zxsd_xml_reader_t *reader)
Release optional scratch storage owned by a raw XML reader.
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_text(zxsd_stream_t *stream, const char *text, size_t length)
Supply decoded character data for the current element.
#define ZXSD_XML_TOKEN_CAPACITY
Maximum bytes retained for one incomplete XML tag, comment, PI, or CDATA section.
zxsd_type_t
Primitive and compound value kinds understood by the runtime.
@ ZXSD_F_MAX_INCLUSIVE
Inclusive upper bound is active.
@ ZXSD_F_MAX_LENGTH
Maximum length is active.
@ ZXSD_F_MIN_EXCLUSIVE
Exclusive lower bound is active.
@ ZXSD_F_PATTERN
Pattern constraint is active.
@ ZXSD_F_LENGTH
Exact length is active.
@ ZXSD_F_FRACTION_DIGITS
Maximum fractional digits is active.
@ ZXSD_F_MAX_EXCLUSIVE
Exclusive upper bound is active.
@ ZXSD_F_TOTAL_DIGITS
Maximum decimal digits is active.
@ ZXSD_F_MIN_LENGTH
Minimum length is active.
@ ZXSD_F_MIN_INCLUSIVE
Inclusive lower bound is active.
@ ZXSD_ID_KEYREF
xs:keyref.
@ ZXSD_ID_UNIQUE
xs:unique.
@ ZXSD_ERR_MISSING_ATTRIBUTE
A required attribute is absent.
@ ZXSD_ERR_IDENTITY_CONSTRAINT
A unique, key or keyref rule failed.
@ ZXSD_ERR_INPUT_TOO_LARGE
XML exceeds ZXSD_MAX_INPUT.
@ ZXSD_ERR_MALFORMED_XML
XML syntax is malformed.
@ ZXSD_ERR_UNSUPPORTED
A valid document cannot be represented by a binding.
@ ZXSD_ERR_OCCURRENCE
An occurrence bound was violated.
@ ZXSD_ERR_MISSING_ELEMENT
A required child element is absent.
@ ZXSD_ERR_INCOMPATIBLE_ABI
Runtime epochs, limits, or public layouts differ.
@ ZXSD_ERR_ELEMENT_ORDER
Sequence order is incorrect.
@ ZXSD_ERR_INVALID_VALUE
A primitive or restricted value is invalid.
@ ZXSD_ERR_UNEXPECTED_ATTRIBUTE
An attribute is not permitted.
@ ZXSD_ERR_EXCESSIVE_NESTING
XML nesting exceeds the limit.
@ ZXSD_ERR_UNEXPECTED_ELEMENT
A child element is not permitted.
@ ZXSD_ERR_WRONG_ROOT
The document root does not match.
@ ZXSD_ERR_TEXT_NOT_ALLOWED
Text occurred in element-only content.
@ ZXSD_ERR_STREAM_LIMIT
A fixed streaming buffer was exceeded.
@ ZXSD_ERR_ARGUMENT
A required argument is invalid.
@ ZXSD_ERR_RESOURCE_LIMIT
A configured resource limit was exceeded.
@ ZXSD_OK
Validation succeeded.
@ ZXSD_ERR_OUTPUT
A binding output sink or buffer failed.
@ ZXSD_WS_COLLAPSE
Replace, trim and collapse whitespace runs.
@ ZXSD_WS_PRESERVE
Keep every character unchanged.
@ ZXSD_WS_REPLACE
Replace tab, carriage return and line feed.
@ ZXSD_SIMPLE_UNION
Value accepted by at least one member type.
@ ZXSD_SIMPLE_ATOMIC
One atomic value.
@ ZXSD_SIMPLE_LIST
Whitespace-separated item sequence.
@ ZXSD_PARTICLE_ALL
Unordered child particles.
@ ZXSD_PARTICLE_SEQUENCE
Ordered child particles.
@ ZXSD_PARTICLE_ANY
Element wildcard.
@ ZXSD_PARTICLE_CHOICE
One alternative.
@ ZXSD_PARTICLE_ELEMENT
Element declaration.
@ ZXSD_SEQUENCE
Children occur in declaration order.
@ ZXSD_ALL
Children may occur in any order.
@ ZXSD_CHOICE
Children select from alternatives.
@ ZXSD_PROCESS_LAX
Validate when a declaration is available.
@ ZXSD_PROCESS_STRICT
A matching declaration is required.
@ ZXSD_PROCESS_SKIP
Accept the matching subtree without validation.
@ ZXSD_XML_EVENT_END_ELEMENT
End element with expanded name.
@ ZXSD_XML_EVENT_TEXT
Decoded character data.
@ ZXSD_XML_EVENT_START_ELEMENT
Start element with expanded name.
@ ZXSD_XML_EVENT_ATTRIBUTE
Attribute on the current element.
@ ZXSD_DERIVATION_EXTENSION
Complex extension.
@ ZXSD_DERIVATION_ALL
Every supported method.
@ ZXSD_DERIVATION_RESTRICTION
Simple or complex restriction.
@ ZXSD_DERIVATION_UNION
Simple union derivation.
@ ZXSD_DERIVATION_SUBSTITUTION
Element substitution group.
@ ZXSD_DERIVATION_LIST
Simple list derivation.
@ ZXSD_T_COMPLEX
Element-only complex content.
@ ZXSD_T_DATE_TIME
XML Schema dateTime.
@ ZXSD_T_NON_NEGATIVE_INTEGER
Integer greater than or equal to zero.
@ ZXSD_T_NON_POSITIVE_INTEGER
Integer less than or equal to zero.
@ ZXSD_T_QNAME
XML Schema QName.
@ ZXSD_T_IDREF
XML Schema IDREF.
@ ZXSD_T_POSITIVE_INTEGER
Integer greater than zero.
@ ZXSD_T_ID
XML Schema ID.
@ ZXSD_T_DATE
XML Schema date.
@ ZXSD_T_BOOLEAN
XML Schema boolean.
@ ZXSD_T_NEGATIVE_INTEGER
Integer less than zero.
@ ZXSD_T_UNSIGNED_SHORT
Unsigned 16-bit XML Schema integer.
@ ZXSD_T_GMONTH_DAY
XML Schema gMonthDay.
@ ZXSD_T_DURATION
XML Schema duration.
@ ZXSD_T_NOTATION
XML Schema NOTATION QName.
@ ZXSD_T_BASE64_BINARY
XML Schema base64Binary.
@ ZXSD_T_HEX_BINARY
XML Schema hexBinary.
@ ZXSD_T_BYTE
Signed 8-bit XML Schema integer.
@ ZXSD_T_DECIMAL
XML Schema decimal.
@ ZXSD_T_LANGUAGE
XML Schema language.
@ ZXSD_T_GDAY
XML Schema gDay.
@ ZXSD_T_STRING
XML Schema string.
@ ZXSD_T_INTEGER
Arbitrary-width integer lexical form.
@ ZXSD_T_NORMALIZED_STRING
XML Schema normalizedString.
@ ZXSD_T_INT
Signed 32-bit XML Schema integer.
@ ZXSD_T_NCNAME
XML Schema NCName.
@ ZXSD_T_GYEAR
XML Schema gYear.
@ ZXSD_T_NMTOKEN
XML Schema NMTOKEN.
@ ZXSD_T_UNSIGNED_BYTE
Unsigned 8-bit XML Schema integer.
@ ZXSD_T_GYEAR_MONTH
XML Schema gYearMonth.
@ ZXSD_T_UNSIGNED_INT
Unsigned 32-bit XML Schema integer.
@ ZXSD_T_FLOAT
XML Schema float.
@ ZXSD_T_UNSIGNED_LONG
Unsigned 64-bit XML Schema integer.
@ ZXSD_T_DOUBLE
XML Schema double.
@ ZXSD_T_ANY_URI
XML Schema anyURI.
@ ZXSD_T_SHORT
Signed 16-bit XML Schema integer.
@ ZXSD_T_TIME
XML Schema time.
@ ZXSD_T_LONG
Signed 64-bit XML Schema integer.
@ ZXSD_T_ENTITY
XML Schema ENTITY.
@ ZXSD_T_GMONTH
XML Schema gMonth.
@ ZXSD_T_TOKEN
XML Schema token.
@ ZXSD_T_NAME
XML Schema Name.
Optional allocator used by validation features requiring scratch storage.
void * context
Opaque callback context.
zxsd_deallocate_fn deallocate
Matching release callback.
zxsd_allocate_fn allocate
Allocation callback.
Generated descriptor for an XML attribute.
const zxsd_simple_t * simple_type
Simple restriction, if any.
const char * fixed_value
Required value when present.
const char * default_value
Value used when absent, or NULL.
const char * name
Local attribute name.
const char * namespace_uri
Required namespace, or NULL.
zxsd_type_t type
Primitive value kind.
int required
Non-zero when required.
Generated descriptor for a complex XML Schema type.
int any_type
Non-zero for the built-in xs:anyType.
unsigned long min_occurs
Minimum model occurrences.
const zxsd_simple_t * simple_content
Text type for simpleContent.
size_t element_count
Number of child descriptors.
unsigned derivation_method
Extension or restriction.
const zxsd_particle_t * particle
Recursive v0.7 content model.
const char * type_namespace
Named type namespace, or NULL.
zxsd_model_t model
Child content model.
const zxsd_attribute_t * attributes
Attribute descriptors.
int mixed_content
Non-zero when character data is allowed.
size_t attribute_count
Number of attribute descriptors.
const char * type_name
Named type local name, or NULL.
unsigned final_methods
Methods forbidden to descendants.
const struct zxsd_complex * base_definition
Named base complex type.
zxsd_type_t simple_content_type
Built-in simpleContent kind.
const zxsd_wildcard_t * any_attribute
Attribute wildcard, or NULL.
int has_simple_content
Non-zero for simpleContent.
const zxsd_element_t * elements
Child particle descriptors.
unsigned long max_occurs
Maximum model occurrences.
unsigned block_methods
Derivations forbidden when this type is used through xsi:type.
int abstract_type
Non-zero if direct use is forbidden.
Generated descriptor for an element particle.
const char * default_value
Schema default, or NULL.
const char * substitution_head_name
Head local name, or NULL.
const zxsd_simple_t * simple_type
Simple restriction, if any.
const char * fixed_value
Required fixed value, or NULL.
zxsd_type_t type
Value kind.
unsigned long min_occurs
Minimum occurrences.
const char * name
Local element name.
unsigned long max_occurs
Maximum, or ULONG_MAX.
int nillable
Non-zero when xsi:nil is allowed.
const char * substitution_head_namespace
Head namespace, or NULL.
const char * namespace_uri
Required namespace, or NULL.
unsigned block_methods
Prohibited runtime substitutions.
const struct zxsd_complex * complex_type
Complex descriptor, if any.
int abstract_element
Non-zero when substitution is required.
Global attribute declaration available to strict/lax wildcards.
const char * default_value
Schema default, or NULL.
const char * namespace_uri
Namespace URI, or NULL.
const zxsd_simple_t * simple_type
Restricted type, or NULL.
const char * fixed_value
Required fixed value, or NULL.
zxsd_type_t type
Simple value kind.
const char * name
Local attribute name.
Global element declaration available to strict/lax wildcards.
const char * substitution_head_name
Head local name, or NULL.
unsigned block_methods
Prohibited substitutions.
const char * namespace_uri
Namespace URI, or NULL.
const char * default_value
Schema default, or NULL.
const zxsd_simple_t * simple_type
Simple descriptor, if any.
const char * name
Local element name.
const char * substitution_head_namespace
Head namespace, or NULL.
zxsd_type_t type
Value kind.
int nillable
Non-zero when xsi:nil is allowed.
const char * fixed_value
Required fixed value, or NULL.
const struct zxsd_complex * complex_type
Complex descriptor, if any.
int abstract_element
Non-zero for an abstract declaration.
Compiled xs:unique, xs:key or xs:keyref descriptor.
size_t refer_index
Referenced key index for keyref.
zxsd_xpath_t selector
Selected element path.
zxsd_identity_kind_t kind
Constraint category.
zxsd_xpath_t scope
Element path that owns each constraint scope.
const zxsd_xpath_t * fields
Tuple fields.
const char * name
Constraint name.
size_t field_count
Number of tuple fields.
Named type entry used to resolve runtime xsi:type values.
const char * name
Type local name.
zxsd_type_t type
Value kind.
const char * namespace_uri
Type namespace, or NULL.
const struct zxsd_complex * complex_type
Complex descriptor.
const zxsd_simple_t * simple_type
Simple descriptor.
Global XML Schema notation declaration.
const char * name
Notation local name.
const char * namespace_uri
Target namespace URI, or NULL.
const char * public_identifier
Public identifier, or NULL.
const char * system_identifier
System URI, or NULL.
Recursive descriptor for a compiled content-model particle.
size_t child_count
Number of group children.
zxsd_particle_kind_t kind
Particle kind.
const zxsd_element_t * element
Element for element particles.
unsigned long max_occurs
Maximum, or ULONG_MAX.
const zxsd_wildcard_t * wildcard
Wildcard configuration.
unsigned long min_occurs
Minimum repetitions.
const struct zxsd_particle * children
Group child particles.
Structured result returned by every generated validator.
const char * path
Schema item involved, or NULL.
size_t offset
Byte offset associated with the result.
const char * message
Static, human-readable status text.
zxsd_error_t code
Validation status.
Caller configuration stamp for a same-toolchain runtime boundary.
unsigned int no_heap
Whether ZXSD_NO_HEAP was defined.
unsigned int runtime_abi
Public API/layout epoch.
unsigned int descriptor_abi
Descriptor interpretation epoch.
Root descriptor consumed by the generic validation runtime.
unsigned block_methods
Root block constraints.
const zxsd_identity_t * identities
Root identity constraints.
size_t notation_count
Number of notation declarations.
size_t global_element_count
Number of global declarations.
const zxsd_simple_t * root_simple
Root simple restriction.
const zxsd_global_attribute_t * global_attributes
Attribute registry.
size_t global_attribute_count
Number of global attributes.
const zxsd_global_element_t * global_elements
Wildcard declaration registry.
const zxsd_complex_t * root_complex
Root complex descriptor.
zxsd_type_t root_type
Root value kind.
const zxsd_notation_t * notations
Global notation declaration registry.
size_t named_type_count
Number of named type entries.
int abstract_element
Non-zero when root is abstract.
int nillable
Non-zero when root permits xsi:nil.
const zxsd_named_type_t * named_types
Runtime xsi:type registry.
const char * root_namespace_uri
Root namespace, or NULL.
const char * default_value
Root default, or NULL.
size_t identity_count
Number of identity constraints.
const char * fixed_value
Root fixed value, or NULL.
const char * root_name
Root local name.
Reference to a built-in or generated simple type.
const struct zxsd_simple * simple
Generated descriptor, or NULL.
zxsd_type_t type
Built-in primitive or derived kind.
Generated descriptor for a restricted, list or union simple type.
const char *const * patterns
Pattern constraints from each restriction.
size_t max_length
Maximum character length.
unsigned facets
Bitwise combination of ZXSD_F_*.
zxsd_whitespace_t whitespace
Normalization applied before validation.
const char * max_exclusive
Exclusive upper-bound text.
zxsd_type_t base
Primitive base type.
size_t member_type_count
Number of union member types.
size_t total_digits
Maximum significant decimal digits.
size_t fraction_digits
Maximum fractional decimal digits.
const char * min_exclusive
Exclusive lower-bound text.
const char * type_namespace
Named type namespace, or NULL.
const char *const * enumeration_namespaces
Namespace URI for each QName/NOTATION enumeration, or NULL.
size_t min_length
Minimum character length.
const char * max_inclusive
Inclusive upper-bound text.
const char * type_name
Named type local name, or NULL.
const zxsd_simple_ref_t * member_types
Union member types.
size_t length
Exact character length.
const char * min_inclusive
Inclusive lower-bound text.
unsigned final_methods
Methods forbidden to descendants.
size_t enumeration_count
Number of enumeration values.
const struct zxsd_simple * base_definition
Named base definition.
size_t pattern_count
Number of conjunctive pattern constraints.
zxsd_simple_variety_t variety
Atomic, list or union variety.
const char *const * enumeration
Permitted lexical values.
unsigned derivation_method
Method used to derive this type.
zxsd_simple_ref_t item_type
Item type for ZXSD_SIMPLE_LIST.
const char * pattern
Embedded pattern expression.
Internal per-element state exposed only to permit static allocation.
int skip_validation
Wildcard skip/lax unknown subtree.
const zxsd_simple_t * simple_type
Effective simple type.
size_t namespace_base
Namespace stack base for this element.
size_t child_count
Number of child events received.
unsigned long model_occurrences
Non-empty sequence iterations consumed by the cursor.
const char * expected_name
Schema-owned expected local name.
const zxsd_complex_t * complex_type
Effective complex type.
size_t text_length
Bytes currently in text.
size_t sequence_index
Current sequence position.
int content_started
Whether attributes are closed.
const char * default_value
Element default.
uint16_t model_states
Head of the nested-model frontier in the shared pool.
zxsd_type_t type
Effective value type.
size_t child_particle_table_count
Number of entries in the particle table.
int incremental_model
Internal content-model cursor mode, or zero for history.
int nilled
Whether xsi:nil was true.
const char * expected_namespace
Schema-owned expected namespace.
const char * fixed_value
Element fixed value.
int nillable
Whether xsi:nil is permitted.
Internal immutable continuation or frontier entry, for static allocation only.
uint32_t references
Owning references to this shared entry.
uint16_t next
Frontier/free-list link, or zero.
unsigned char phase
Internal interpreter instruction.
size_t index
Next sequence term.
unsigned long count
Completed non-empty occurrences.
const struct zxsd_particle * particle
Particle interpreted by this continuation.
uint16_t parent
Continuation after this particle, or zero.
unsigned char started
Current group iteration consumed a token.
Internal namespace binding retained by the event-driven validator.
Bounded state for the event-driven validator.
zxsd_result_t result
Sticky result of the first failed event.
size_t identity_xml_length
Bytes used in identity_xml.
char * identity_xml
Internal reconstructed XML buffer.
size_t depth
Number of currently open elements.
size_t event_offset
Monotonic event index used in diagnostics.
size_t namespace_count
Number of active entries in namespaces.
uint16_t model_high_water
Highest slot ever allocated; bounds interning scans.
const zxsd_schema_t * schema
Generated schema being validated.
size_t identity_xml_capacity
Allocated reconstructed XML bytes.
int model_pool_initialized
Whether the lazy free list has been initialized.
uint16_t model_free
First free pool slot, or zero.
int finished
Non-zero after a complete root element.
zxsd_allocator_t identity_allocator
Allocator for streamed identity validation.
XML Schema element or attribute wildcard.
zxsd_process_t process_contents
strict, lax or skip behavior.
const char * target_namespace
Schema target namespace, or NULL.
const char * namespace_constraint
Original namespace constraint.
Bounded raw-XML reader feeding an event-driven validator.
zxsd_xml_event_fn event_callback
Optional decoded-event observer.
unsigned char quote
Active attribute quote, or zero.
unsigned char markup
Non-zero while retaining markup beginning with <.
size_t token_length
Bytes currently retained in token.
zxsd_result_t result
Sticky result of the first parser or validator error.
size_t token_offset
Absolute offset of the retained token.
zxsd_stream_t validator
Event-driven validator receiving decoded XML events.
size_t offset
Total number of input bytes accepted.
void * event_user_data
Opaque observer context.
One expanded-name step in the restricted identity XPath subset.
const char * namespace_uri
Required namespace, or NULL.
const char * name
Local name, or NULL for a wildcard step.
Compiled restricted XPath used by identity constraints.
int descendant
Non-zero for a leading .
size_t alternative_count
Number of union branches.
size_t step_count
Number of steps.
const struct zxsd_xpath * alternatives
Union branches, or NULL.
int attribute
Non-zero when the final step is an attribute.
const zxsd_xpath_step_t * steps
Path steps.
Release identifiers and generated-code compatibility epochs.