uss-xsd-engine 0.1.0-beta.3 → 0.1.0-beta.4

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 CHANGED
@@ -4,6 +4,14 @@ Browser-first XSD engine for schema diagnostics, tree extraction, sample XML gen
4
4
 
5
5
  ---
6
6
 
7
+ ![npm](https://img.shields.io/npm/v/uss-xsd-engine)
8
+
9
+ ---
10
+
11
+ > 📦 Latest release: See full details in [GitHub Releases](https://github.com/mumblebaj/uss-xsd-engine/releases)
12
+
13
+ ---
14
+
7
15
  ## 🚀 Overview
8
16
 
9
17
  `uss-xsd-engine` is a standalone JavaScript engine designed to process XML Schema (XSD) directly in the browser.
@@ -90,7 +98,7 @@ import {
90
98
  ### CDN/Browser
91
99
 
92
100
  ```HTML
93
- <script src="https://unpkg.com/uss-xsd-engine@0.1.0-beta.3/dist/uss-xsd-engine.standalone.js"></script>
101
+ <script src="https://unpkg.com/uss-xsd-engine@0.1.0-beta.4/dist/uss-xsd-engine.standalone.js"></script>
94
102
 
95
103
  <script>
96
104
  const result = UssXsdEngine.getSchemaDiagnostics({ xsdText });
@@ -173,6 +181,115 @@ validateXml({
173
181
 
174
182
  ---
175
183
 
184
+ ## 🤔 Why uss-xsd-engine?
185
+
186
+ Most XML/XSD libraries were designed for server-side environments, require heavy dependencies, or lack meaningful diagnostics.
187
+
188
+ **uss-xsd-engine** is built differently — with a focus on modern, browser-first use cases and developer experience.
189
+
190
+ ---
191
+
192
+ ### 🌐 Browser-First by Design
193
+
194
+ * Runs fully in the browser
195
+ * No native dependencies or network fetching required
196
+ * Perfect for tools like USS, editors, and client-side validation
197
+
198
+ ---
199
+
200
+ ### 🧭 Precise Error Diagnostics
201
+
202
+ * Line/column support for both:
203
+
204
+ * XML parsing errors
205
+ * Schema validation errors
206
+ * Click-to-navigate support (e.g. Monaco Editor integration)
207
+ * Fine-grained mapping:
208
+
209
+ * elements
210
+ * attributes
211
+ * values
212
+
213
+ ➡️ Debug XML like you debug code
214
+
215
+ ---
216
+
217
+ ### 🌐 Namespace-Aware Everything
218
+
219
+ * Proper handling of `targetNamespace`
220
+ * Prefix-aware sample XML generation
221
+ * Multi-schema support with correct namespace boundaries
222
+
223
+ ➡️ No more ambiguity in complex schema environments
224
+
225
+ ---
226
+
227
+ ### 🔁 Real Multi-Schema Support
228
+
229
+ * Recursive `xs:include` and `xs:import` resolution
230
+ * Handles deep schema graphs (A → B → C)
231
+ * Circular-safe resolution
232
+
233
+ ➡️ Works with real-world schemas (not just simple examples)
234
+
235
+ ---
236
+
237
+ ### 🧩 Practical XML Generation
238
+
239
+ * Generates usable sample XML
240
+ * Respects:
241
+
242
+ * structure
243
+ * required elements
244
+ * namespaces
245
+ * Designed for real testing, not just demos
246
+
247
+ ---
248
+
249
+ ### ⚡ Lightweight & Modular
250
+
251
+ * No heavy runtime dependencies
252
+ * Designed for CDN + npm usage
253
+ * Easy to embed into any tool or workflow
254
+
255
+ ---
256
+
257
+ ### 🧠 Built for Tooling
258
+
259
+ * Tree extraction for UI rendering
260
+ * Structured diagnostics pipeline
261
+ * Clean API surface for integration
262
+
263
+ ➡️ Not just a library — a foundation for schema tooling
264
+
265
+ ---
266
+
267
+ ## 🚀 When to Use This Engine
268
+
269
+ Use **uss-xsd-engine** if you need:
270
+
271
+ * In-browser XML validation against XSD
272
+ * Schema-driven XML generation
273
+ * Developer-friendly diagnostics
274
+ * Multi-schema (include/import) support
275
+ * A lightweight alternative to server-side XML tools
276
+
277
+ ---
278
+
279
+ ## ⚠️ What This Is NOT (Yet)
280
+
281
+ * Full W3C spec-complete validator (edge cases still evolving)
282
+ * Streaming validator for very large XML
283
+ * Identity constraint (`xs:key`, etc.) enforcement
284
+
285
+ ➡️ The focus is **practical correctness + usability**, with continuous expansion
286
+
287
+ ---
288
+
289
+ 💡 This engine is actively evolving — built to power real tools, not just validate specs.
290
+
291
+ ---
292
+
176
293
  ## ⚠️ Supported vs Not Fully Supported
177
294
  ### ✅ Supported (v0.1.x)
178
295
  - Most common XSD structures
@@ -181,19 +298,22 @@ validateXml({
181
298
  - Restrictions (subset + occurrence checks)
182
299
  - Facet validation (including pattern)
183
300
  - Default / fixed semantics
184
- - Include/import (manual provision)
185
- - Sample XML generation (practical coverage)
186
- - XML validation (core structure + facets)
301
+ - Include/import (manual provision with recursive resolution)
302
+ - Sample XML generation (namespace-aware, multi-schema support)
303
+ - XML validation (structure, facets, and source-mapped diagnostics)
304
+ - XML parse diagnostics with line/column support
305
+ - Semantic validation diagnostics with line/column support
306
+ - Attribute and value-level source mapping
307
+ - Namespace-aware schema tree extraction
187
308
 
188
309
  ---
189
310
 
190
311
  ## ⚠️ Partially Supported / In Progress
191
312
  - Deep sample XML expansion (choice branching, recursion depth)
192
313
  - Full restriction theorem validation (advanced edge cases)
193
- - Namespace preservation strategies in generation
314
+ - Advanced Namespace handling (prefix customizatioon, default namespace strategies)
194
315
  - Advanced wildcard (`xs:any`, `xs:anyAttribute`)
195
316
  - Attribute namespace qualification
196
- - Recursive include/import graph resolution
197
317
 
198
318
  ---
199
319
 
@@ -202,7 +322,7 @@ validateXml({
202
322
  - Automatic network fetching of schemas
203
323
  - Full W3C spec conformance (edge-case completeness)
204
324
  - Streaming validation for very large XML
205
- - Chameleon includes
325
+ - Chameleon includes (namespace adaptation)
206
326
 
207
327
  ---
208
328