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
So working with the library as I built it is sometimes pretty cumbersome. Some reasons:
Parsing needs lots of context for good error reporting
All basic validation, cross-linking, etc. happens in one huge chunk of code
A better way might be:
First parse with local validation (probably hand-written, pull-based with quick-xml)
Intermediate validation (e.g. uniqueness of names in their containers, etc.)
Then do cross-linking of all the referential stuff
Intermediate validation
Here ends the two-way compat
Instantiate templates
Final validations
Problem: How to know the file location in later validation steps? -> Either attach a file location to everything, or use roxmltree and attach an original node reference to everything with which we can later retrieve the position. Or stick with the current architecture, but it is one-way only and hard to later extend to be two-way.
Althought it seems like the first step could be done with quick-xml serde-derive, it (probably?) wouldn't support the lenient error handling of opengdtf. I think we'd have to write our own serde or quick-xml code.
But this might come with its own issues. Just wanted to write down that thought.
The text was updated successfully, but these errors were encountered:
Firionus
changed the title
Better Architectural Appraoches
Better Architectural Approaches
May 29, 2023
So working with the library as I built it is sometimes pretty cumbersome. Some reasons:
A better way might be:
Problem: How to know the file location in later validation steps? -> Either attach a file location to everything, or use roxmltree and attach an original node reference to everything with which we can later retrieve the position. Or stick with the current architecture, but it is one-way only and hard to later extend to be two-way.
Althought it seems like the first step could be done with quick-xml serde-derive, it (probably?) wouldn't support the lenient error handling of opengdtf. I think we'd have to write our own serde or quick-xml code.
But this might come with its own issues. Just wanted to write down that thought.
The text was updated successfully, but these errors were encountered: