Adding XML Support #29
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Expanded SPEC.md to version 4.0 with comprehensive XML support, including sections for namespaces, attributes, repeated elements, mixed content, CDATA, and XML encoding/decoding. Added XML-related references, examples, and conformance requirements. Updated examples/README.md to document new XML example files and their coverage. Added new XML example and test fixture files for conversions, valid, and invalid cases.
Type of Change
Motivation and Context
I would like to convert XML files to TOON. Spending around a month playing about with different formats across differing models adding/removing support with a focus on the model understanding the raw data, I think I've settled on the right combination of support for XML. DTD, pre-processors, understanding attributes, etc did not seem to add any value to comprehension of the data being provided.
Changes Made
Specification Sections Affected
New Sections Added
Section 22: XML Constructs
Section 23: Namespaces
Section 24: Attributes
Section 25: Repeated Elements
Section 26: Mixed Content
Section 27: CDATA and Text Content
Section 28: XML Encoding and Decoding
Appendix H: XML Examples (Informative)
Modified Sections
Section 1: Terminology and Conventions
Section 2: Data Model
Restructured into subsections:
Section 3: Encoding Normalization (Reference Encoder)
Section 4: Decoding Interpretation (Reference Decoder)
Section 6: Header Syntax (Normative)
Section 7: Strings and Keys
Section 13: Conformance and Options
Section 14: Strict Mode Errors and Diagnostics (Authoritative Checklist)
Section 17: Interoperability and Mappings (Informative)
Section 18: IANA Considerations
Appendix B: Parsing Helpers (Informative)
Appendix D: Document Changelog (Informative)
Appendix G: Host Type Normalization Examples (Informative)
Abstract
Purpose and Scope
Type Terms (§1.6)
Conformance Checklists (§13)
Backward Compatibility
Impact on Existing Implementations
namespace:key: valuewill no longer cause an implementation expecting an error to trigger oneExamples
Numerous included in the examples folder of the PR.
Test Coverage
Documentation
Checklist
For Maintainers: