uss-xsd-engine 0.1.1 โ 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -71
- package/dist/uss-xsd-engine.esm.js +1325 -116
- package/dist/uss-xsd-engine.standalone.js +1325 -116
- package/package.json +71 -70
package/README.md
CHANGED
|
@@ -16,6 +16,12 @@ Browser-first XSD engine for schema diagnostics, tree extraction, sample XML gen
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
+
Consult the Api Documentation for detailed usage and features:
|
|
20
|
+
|
|
21
|
+
> ๐ API Documentation: See full details in [API DOCUMENTATION](https://github.com/mumblebaj/uss-xsd-engine/blob/main/API_DOCUMENTATION.md)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
19
25
|
## ๐ Overview
|
|
20
26
|
|
|
21
27
|
`uss-xsd-engine` is a standalone JavaScript engine designed to process XML Schema (XSD) directly in the browser.
|
|
@@ -60,6 +66,8 @@ It is built to power tools like USS XSD Studio while remaining lightweight, depe
|
|
|
60
66
|
- Honors:
|
|
61
67
|
- `fixed` values
|
|
62
68
|
- `default` values
|
|
69
|
+
- Depth-limited generation with cycle-safe recursion
|
|
70
|
+
- Controlled choice and repeated element expansion
|
|
63
71
|
|
|
64
72
|
### โ
XML Validation
|
|
65
73
|
- Validate XML against XSD structure
|
|
@@ -71,6 +79,9 @@ It is built to power tools like USS XSD Studio while remaining lightweight, depe
|
|
|
71
79
|
- Mixed content enforcement
|
|
72
80
|
- Attribute validation
|
|
73
81
|
- Facet validation (pattern, length, numeric, etc.)
|
|
82
|
+
- Wildcard support for `xs:any` and `xs:anyAttribute`
|
|
83
|
+
- `processContents` support (`strict`, `lax`, `skip`)
|
|
84
|
+
- Namespace constraint handling including `##any`, `##other`, `##targetNamespace`, exclusions via `notNamespace` and `notQName`
|
|
74
85
|
- Restriction enforcement (runtime)
|
|
75
86
|
- Fixed value enforcement
|
|
76
87
|
|
|
@@ -157,6 +168,9 @@ Generates example XML from XSD.
|
|
|
157
168
|
- `mode`: `"minimal"` (default) or `"full"`
|
|
158
169
|
- `targetPrefix`: namespace prefix (default `"tns"`)
|
|
159
170
|
- `includeOptionalAttributes`: boolean
|
|
171
|
+
- `maxDepth`: number โ limit recursive complex type expansion (default: 3)
|
|
172
|
+
- `maxChoiceBranches`: number โ limit how many choice branches are expanded (default: 1)
|
|
173
|
+
- `expandRepeatingElements`: number โ limit repeated element expansion for `maxOccurs > 1` (default: 2)
|
|
160
174
|
- `externalDocuments`: map of schemaLocation โ XSD text
|
|
161
175
|
|
|
162
176
|
---
|
|
@@ -287,22 +301,12 @@ Use **uss-xsd-engine** if you need:
|
|
|
287
301
|
|
|
288
302
|
---
|
|
289
303
|
|
|
290
|
-
## โ ๏ธ What This Is NOT (Yet)
|
|
291
|
-
|
|
292
|
-
* Full W3C spec-complete validator (edge cases still evolving)
|
|
293
|
-
* Streaming validator for very large XML
|
|
294
|
-
* Identity constraint (`xs:key`, etc.) enforcement
|
|
295
|
-
|
|
296
|
-
โก๏ธ The focus is **practical correctness + usability**, with continuous expansion
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
304
|
๐ก This engine is actively evolving โ built to power real tools, not just validate specs.
|
|
301
305
|
|
|
302
306
|
---
|
|
303
307
|
|
|
304
308
|
## โ ๏ธ Supported vs Not Fully Supported
|
|
305
|
-
### โ
Supported (v0.1
|
|
309
|
+
### โ
Supported (v0.2.1)
|
|
306
310
|
- XSD parsing into an internal schema model
|
|
307
311
|
- Namespace-aware resolution (elements, types, attributes, groups)
|
|
308
312
|
- Extensions (`xs:extension`)
|
|
@@ -335,32 +339,13 @@ Use **uss-xsd-engine** if you need:
|
|
|
335
339
|
|
|
336
340
|
---
|
|
337
341
|
|
|
338
|
-
## โ ๏ธ Partially Supported / In Progress
|
|
339
|
-
- Deep sample XML expansion:
|
|
340
|
-
- complex choice branching
|
|
341
|
-
- recursion depth control
|
|
342
|
-
- Full restriction theorem validation:
|
|
343
|
-
- advanced edge cases (beyond practical subset checks)
|
|
344
|
-
- Advanced wildcard handling:
|
|
345
|
-
- `xs:any`
|
|
346
|
-
- `xs:anyAttribute`
|
|
347
|
-
- Attribute namespace qualification edge cases
|
|
348
|
-
|
|
349
|
-
---
|
|
350
|
-
|
|
351
342
|
## โ Not Supported Yet
|
|
352
|
-
- Identity constraints:
|
|
353
|
-
- `xs:key`
|
|
354
|
-
- `xs:keyref`
|
|
355
|
-
- `xs:unique`
|
|
356
|
-
- `xs:redefine`
|
|
357
343
|
- Automatic network fetching of schemas
|
|
358
344
|
- (engine is intentionally browser-first and caller-driven)
|
|
359
345
|
- Full W3C spec completeness
|
|
360
346
|
- (focus is practical + real-world coverage)
|
|
361
347
|
- Streaming / incremental validation for very large XML
|
|
362
348
|
|
|
363
|
-
|
|
364
349
|
---
|
|
365
350
|
|
|
366
351
|
## ๐งช Playground
|
|
@@ -376,47 +361,6 @@ The playground uses the built bundle to simulate real-world usage.
|
|
|
376
361
|
|
|
377
362
|
---
|
|
378
363
|
|
|
379
|
-
## ๐งฑ Architecture
|
|
380
|
-
|
|
381
|
-
```ruby
|
|
382
|
-
src/
|
|
383
|
-
api/
|
|
384
|
-
parser/
|
|
385
|
-
model/
|
|
386
|
-
resolver/
|
|
387
|
-
validation/
|
|
388
|
-
generator/
|
|
389
|
-
tree/
|
|
390
|
-
diagnostics/
|
|
391
|
-
utils/
|
|
392
|
-
```
|
|
393
|
-
Design principles:
|
|
394
|
-
- browser-first
|
|
395
|
-
- dependency-light
|
|
396
|
-
- layered architecture
|
|
397
|
-
- shared semantic model across all features
|
|
398
|
-
|
|
399
|
-
---
|
|
400
|
-
|
|
401
|
-
## ๐ฃ๏ธ Roadmap
|
|
402
|
-
### Near-term
|
|
403
|
-
- Recursive include/import resolution
|
|
404
|
-
- Improved sample XML depth traversal
|
|
405
|
-
- Restriction enforcement (advanced cases)
|
|
406
|
-
- Better namespace output strategies
|
|
407
|
-
|
|
408
|
-
### Mid-term
|
|
409
|
-
- Identity constraints (key/keyref)
|
|
410
|
-
- Advanced wildcard handling
|
|
411
|
-
- Performance optimizations
|
|
412
|
-
|
|
413
|
-
### Long-term
|
|
414
|
-
- Full XSD spec coverage
|
|
415
|
-
- Streaming validation
|
|
416
|
-
- USS Pro / hosted engine capabilities
|
|
417
|
-
|
|
418
|
-
---
|
|
419
|
-
|
|
420
364
|
## ๐ Versioning
|
|
421
365
|
|
|
422
366
|
This project follows incremental feature delivery:
|