Commit 5987bb4
Fix a panic in interpreter when using multiple schemas without
When processing multiple XSD schemas that share a common schema via
`<xsd:import>`, `xsd-parser` 1.5.2 panics in the interpreter if
`ParserFlags::RESOLVE_INCLUDES` is **not** set.
The panic occurs in `crate_node_cache.rs:127` because the interpreter
unconditionally calls `.unwrap()` on a `dependencies.get()` lookup.
Without `RESOLVE_INCLUDES`, the `dependencies` map is empty, but the
schema content still contains `<xsd:import>` elements with
`schemaLocation` attributes.
Fixed by gracefully skipping the unresolved imports when loading and
falling back to global resolution.RESOLVE_INCLUDES
1 parent 5166cfb commit 5987bb4
1 file changed
Lines changed: 18 additions & 15 deletions
Lines changed: 18 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
927 | 929 | | |
928 | 930 | | |
929 | 931 | | |
930 | | - | |
| 932 | + | |
| 933 | + | |
931 | 934 | | |
932 | 935 | | |
933 | 936 | | |
| |||
0 commit comments