Skip to content

Commit af35fe4

Browse files
committed
Updated TODO list
1 parent 1b29ffa commit af35fe4

1 file changed

Lines changed: 91 additions & 44 deletions

File tree

TODO.md

Lines changed: 91 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,66 @@ This document tracks outstanding tasks, missing features, and improvements neede
66

77
### XML Schema Support
88

9-
#### Complete XML Schema Implementation
9+
#### Complex Type Extension and Derivation Implementation
1010

11-
- **Location**: `ts/schema/` directory
12-
- **Description**: XML Schema validation is currently in initial implementation stage
11+
- **Location**: `ts/schema/ComplexType.ts`, `ts/schema/XMLSchemaGrammar.ts`
12+
- **Description**: Complex type extension and restriction validation needs implementation
1313
- **Details**:
14-
- Complete complex type validation
15-
- Simple type restriction validation
16-
- Namespace-aware validation
17-
- Schema imports and includes
18-
- Identity constraints (key, keyref, unique)
14+
- Implement runtime validation for complex type extensions (e.g., USAddress extending AddressType)
15+
- Support for `<complexContent><extension>` pattern validation
16+
- Inheritance chain validation for extended sequences
17+
- Type substitution with `xsi:type` attributes
18+
- Base type resolution and validation
1919
- **Priority**: High
20-
- **Status**: Framework ready, needs full implementation
20+
- **Status**: Framework ready with derivationMethod and baseType fields, needs validation logic
21+
22+
#### Simple Type Restriction Validation
23+
24+
- **Location**: `ts/schema/SimpleType.ts`, `ts/schema/BuiltinTypes.ts`
25+
- **Description**: Simple type restrictions and facet validation needs enhancement
26+
- **Details**:
27+
- Pattern validation (regex facets)
28+
- Length, minLength, maxLength validation
29+
- Enumeration validation
30+
- Range validation (minInclusive, maxInclusive, etc.)
31+
- Union and list type validation
32+
- **Priority**: High
33+
- **Status**: Basic framework exists, needs facet validation logic
34+
35+
#### Schema Imports and Includes
36+
37+
- **Location**: `ts/schema/XMLSchemaParser.ts`, `ts/schema/XMLSchemaGrammar.ts`
38+
- **Description**: Support for importing and including external schemas
39+
- **Details**:
40+
- `<xs:import>` statement processing
41+
- `<xs:include>` statement processing
42+
- Namespace resolution across imported schemas
43+
- Circular import detection and handling
44+
- **Priority**: Medium
45+
- **Status**: Parser structure ready, needs import/include logic
46+
47+
#### AnyParticle Content Validation Enhancement
48+
49+
- **Location**: `ts/schema/AnyParticle.ts`
50+
- **Description**: Improve xs:any content validation and processing control
51+
- **Details**:
52+
- Implement processContents validation (strict, lax, skip)
53+
- Add proper schema location hints processing
54+
- Enhance validation error reporting for any element validation
55+
- **Priority**: Medium
56+
- **Status**: Namespace validation implemented, needs processContents support
57+
58+
#### Identity Constraints
59+
60+
- **Location**: New classes needed in `ts/schema/`
61+
- **Description**: Support for key, keyref, and unique constraints
62+
- **Details**:
63+
- `<xs:key>`, `<xs:keyref>`, `<xs:unique>` element processing
64+
- XPath selector and field evaluation
65+
- Cross-element constraint validation
66+
- Constraint violation error reporting
67+
- **Priority**: Medium
68+
- **Status**: Not yet implemented
2169

2270
#### JSON Conversion Support
2371

@@ -68,55 +116,51 @@ This document tracks outstanding tasks, missing features, and improvements neede
68116
### Entity Content Processing
69117

70118
- **Location**: `ts/SAXParser.ts`, handleEntityContent method
71-
- **Description**: The current entity content handling is simplified
72-
- **Details**:
73-
- Improve markup content detection and parsing
74-
- Better handling of complex entity content
75-
- More sophisticated content type analysis
76-
- **Priority**: Low
77-
- **Impact**: Edge case handling
78-
79-
### Processing Instruction Validation
80-
81-
- **Location**: `ts/SAXParser.ts`, parseProcessingInstruction method
82-
- **Description**: Enhanced PI validation and processing
119+
- **Description**: Entity content handling needs improvement for complex markup cases
83120
- **Details**:
84-
- Validate PI target names more thoroughly
85-
- Better error messages for malformed PIs
86-
- PI-specific content validation
121+
- Fix handling of entities with partial/malformed markup (e.g., `<!ENTITY e "</foo><foo>">`)
122+
- Proper well-formedness validation for entity-expanded content
123+
- Handle entities containing multiple elements or fragments
124+
- Improve markup detection beyond simple regex patterns
87125
- **Priority**: Low
126+
- **Impact**: Edge case handling, affects XML specification compliance
88127

89128
## Grammar Framework Improvements
90129

91-
### Cross-Schema Group Resolution
130+
### Cross-Schema Group Resolution Enhancement
92131

93132
- **Location**: `ts/grammar/CompositeGrammar.ts`, resolveAllGroupReferences method
94-
- **Description**: Post-loading resolution of cross-schema group references
133+
- **Description**: Complete post-loading batch resolution for unresolved group references
95134
- **Details**:
96-
- Implement unresolved group reference tracking
97-
- Add resolution phase after all schemas are loaded
98-
- Handle circular group dependencies
99-
- **Priority**: Medium
135+
- Core cross-schema resolution is implemented via `resolveCrossSchemaGroup`
136+
- Individual schema parsers have immediate and deferred resolution mechanisms
137+
- Optional: Implement batch post-loading resolution for edge cases with circular dependencies
138+
- **Priority**: Low
139+
- **Status**: Core functionality implemented, placeholder method remains for potential batch processing
100140

101141
### Advanced Namespace Resolution
102142

103143
- **Location**: `ts/grammar/CompositeGrammar.ts`, findElementNameForLookup method
104-
- **Description**: Enhance context-aware element lookup
144+
- **Description**: Enhance context-aware element lookup for local elements
105145
- **Details**:
106-
- Implement local element resolution with parent context
107-
- Better handling of elementFormDefault settings
108-
- Improved qualified name resolution
146+
- Implement local element resolution with parent context (placeholder exists at line 1105-1107)
147+
- elementFormDefault handling is implemented and working
148+
- Basic qualified name resolution works for global elements
149+
- Missing: Context-aware lookup for local elements within complex types
109150
- **Priority**: Medium
151+
- **Status**: Global element resolution complete, local element context resolution needed
110152

111153
### Simple Type Validation Enhancement
112154

113155
- **Location**: `ts/grammar/CompositeGrammar.ts`, validateSimpleType method
114-
- **Description**: Expand simple type validation capabilities
156+
- **Description**: Add union and list type validation to simple type validation
115157
- **Details**:
116-
- Add comprehensive built-in type validation
117-
- Implement restriction facets (pattern, length, etc.)
118-
- Union and list type validation
158+
- Comprehensive built-in type validation is implemented via BuiltinTypes module
159+
- Restriction facets are implemented (pattern, length, enumeration, numeric ranges)
160+
- Missing: Union type validation (SimpleType.getVariety() === 'union')
161+
- Missing: List type validation (SimpleType.getVariety() === 'list')
119162
- **Priority**: Medium
163+
- **Status**: Atomic types and facets complete, union and list types need implementation
120164

121165
## Testing and Quality Assurance
122166

@@ -177,13 +221,16 @@ This document tracks outstanding tasks, missing features, and improvements neede
177221

178222
### URI Validation Enhancement
179223

180-
- **Location**: `ts/schema/BuiltinTypes.ts`
181-
- **Description**: The URI validation is currently very basic
224+
- **Location**: `ts/schema/BuiltinTypes.ts`, validateAnyURI method
225+
- **Description**: The URI validation is currently very basic and overly permissive
182226
- **Details**:
183-
- Implement comprehensive URI validation
184-
- Support for different URI schemes
185-
- Better error messages for invalid URIs
227+
- Current implementation uses URL() constructor then falls back to allowing any non-empty string
228+
- Implement RFC 3986 compliant URI validation
229+
- Add proper validation for relative URIs vs absolute URIs
230+
- Support for different URI schemes with scheme-specific validation
231+
- Better error messages for invalid URI formats
186232
- **Priority**: Low
233+
- **Status**: Basic validation exists but needs comprehensive RFC compliance
187234

188235
## Future Enhancements
189236

@@ -234,5 +281,5 @@ This document tracks outstanding tasks, missing features, and improvements neede
234281

235282
---
236283

237-
*Last updated: January 2025*
284+
*Last updated: October 2025*
238285
*TypesXML Version: 2.0.0*

0 commit comments

Comments
 (0)