1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! Canonical SBE attribute allow-lists.
//!
//! Shared by the always-on parser checks ([`crate::parse`]) and the opt-in
//! XSD-shaped validator ([`crate::validate_against_sbe_xsd`]) so the two
//! cannot drift apart — a divergence here means one of them rejects schemas
//! the other accepts.
//!
//! Each list is the union of the published SBE XSD grammar with the
//! attributes real-world schemas actually carry. **Neither source alone is
//! complete:** the XSD does not declare `constantValue`, `length`,
//! `nullValue`, or `characterEncoding`, all of which sbe-tool accepts and
//! checked-in schemas use; and no schema corpus exercises every attribute
//! the grammar allows. A list derived from either source on its own rejects
//! valid input.
/// `<messageSchema>` root element.
pub const MESSAGE_SCHEMA: & = &;
/// `<message>`.
pub const MESSAGE: & = &;
/// `<field>` and `<data>`.
///
/// One list because the SBE XSD types both elements as `sbe:fieldType` —
/// hand-writing a narrower list for `<data>` drops `epoch`, `offset`,
/// `timeUnit`, and `valueRef`.
pub const FIELD_LIKE: & = &;
/// `<enum>`.
///
/// `nullValue` is a schema-declared wire sentinel (sbe-tool accepts it and
/// codegen emits it). The published XSD omits it; the validator still must
/// accept it so `parse_with_xsd_validation` matches `parse`.
pub const ENUM: & = &;
/// `<group>`.
pub const GROUP: & = &;