You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypesXML is available under two licenses: [AGPL-3.0](./LICENSE) for open source projects and a [Commercial License](./LICENSE-COMMERCIAL.md) for proprietary use. For commercial licensing inquiries, contact [sales@maxprograms.com](mailto:sales@maxprograms.com).
51
16
52
17
## Overview
53
18
54
-
TypesXML implements a complete XML 1.0/1.1 parser with an extensible Grammar framework that supports multiple schema validation approaches. The core architecture provides both SAX (event-driven) and DOM (tree-based) parsing with unified validation through the Grammar interface.
19
+
TypesXML implements XML 1.0/1.1 parsing with an extensible Grammar framework supporting multiple schema validation approaches. The library provides both SAX (event-driven) and DOM (tree-based) parsing with validation through a unified Grammar interface.
55
20
56
21
### Grammar Framework
57
22
58
-
The Grammar interface provides a unified abstraction for schema validation that supports:
23
+
The Grammar interface provides schema validation support for:
59
24
60
25
-**DTD Validation**: Complete Document Type Definition support with full validation
61
-
-**XML Schema**: Extensible framework ready for XML Schema implementation
62
-
-**RelaxNG**: Extensible framework ready for RelaxNG implementation
63
-
-**No-Operation Mode**: Graceful processing without schema validation
26
+
-**XML Schema**: Initial implementation with basic support for XSD validation
27
+
28
+
### Key Features
29
+
30
+
-**OASIS Catalog Support**: Full XML Catalog resolution for DTD and entity references
31
+
-**Entity Resolution**: Built-in support for XML entities and catalog-based resolution
32
+
-**Namespace Support**: XML namespace handling with QualifiedName system
33
+
-**Encoding Support**: Various character encodings including UTF-8, UTF-16LE
34
+
-**XML Writer**: Utilities for writing XML documents with proper formatting
64
35
65
36
### ContentHandler Interface
66
37
@@ -92,47 +63,29 @@ The `DOMBuilder` class implements the `ContentHandler` interface and builds a DO
92
63
93
64
### Core XML Processing
94
65
95
-
-**Complete XML 1.0/1.1 Parser**: Full specification compliance with comprehensive error handling
66
+
-**XML 1.0/1.1 Parser**: Full specification compliance with comprehensive error handling
96
67
-**SAX Parser**: Event-driven parsing for memory-efficient processing of large documents
97
68
-**DOM Builder**: Creates complete in-memory tree representation of XML documents
98
-
-**Encoding Support**: Handles various character encodings including UTF-8, UTF-16LE
69
+
-**OASIS Catalog Support**: Full XML Catalog resolution for DTD and entity references
99
70
-**Entity Resolution**: Built-in support for XML entities and catalog-based resolution
100
71
-**Namespace Support**: Full XML namespace handling with QualifiedName system
-**Flexible Processing**: DTD parsing and default attribute setting works in both validating and non-validating modes
129
-
-**Catalog Support**: Full XML Catalog resolution for DTD and entity references
130
-
-**Enterprise-Grade Error Handling**: Comprehensive validation with detailed error reporting for:
131
-
- Missing required elements and attributes
132
-
- Invalid element sequences and content models
133
-
- Cardinality violations (wrong number of occurrences)
134
-
- Undeclared elements and attributes
135
-
- Invalid attribute values and types
84
+
-**DTD Grammar Implementation**: Full parsing and validation of Document Type Definitions including element declarations, attribute lists, entities, and notations
85
+
-**Content Model Processing**: Complex content model parsing with sequences, choices, and cardinality validation
86
+
-**Default Attribute Processing**: Automatic setting of default attribute values from DTD declarations
87
+
-**Internal and External Subset Processing**: Complete DTD merging with proper precedence handling
88
+
-**Enterprise-Grade Error Handling**: Comprehensive validation with detailed error reporting
136
89
137
90
### Additional Features
138
91
@@ -146,73 +99,6 @@ The `DOMBuilder` class implements the `ContentHandler` interface and builds a DO
146
99
npm install typesxml
147
100
```
148
101
149
-
## Testing
150
-
151
-
TypesXML includes a comprehensive test suite that validates against the **W3C XML Test Suite** - the official standard for XML parser compliance.
152
-
153
-
### Quick Start Testing
154
-
155
-
```bash
156
-
# Setup test suite (first time only)
157
-
npm run test:setup
158
-
159
-
# Run comprehensive W3C XML Test Suite
160
-
npm test
161
-
162
-
# Run XML canonicalizer tests
163
-
npm run test:canonicalizer
164
-
```
165
-
166
-
### Comprehensive Test Features
167
-
168
-
🎯 **Complete W3C Coverage**
169
-
170
-
- Tests against 500+ official W3C XML test files
171
-
- Validates parsing, canonicalization, and error detection
172
-
- Covers valid, invalid, and not-well-formed documents
173
-
174
-
📊 **Advanced Reporting**
175
-
176
-
- Real-time progress indicators with ETA
177
-
- Detailed statistics by test category
178
-
- Performance benchmarks and timing analysis
179
-
- Error categorization and analysis
180
-
- Saves comprehensive JSON reports
181
-
182
-
🚀 **Smart Execution**
183
-
184
-
- Automatic test environment validation
185
-
- Efficient batch processing for large test sets
186
-
- Graceful handling of missing test files
187
-
188
-
### Test Categories
189
-
190
-
-**Valid Documents**: Should parse successfully and match canonical output
191
-
-**Invalid Documents**: Well-formed but fail DTD validation
192
-
-**Not-Well-Formed**: Should be rejected during parsing
0 commit comments