Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify unexpected elements code #15

Closed
wants to merge 5 commits into from
Closed

Conversation

twpayne
Copy link
Owner

@twpayne twpayne commented Nov 28, 2023

Refs #14.

cc @cbrow111

Please look at commit 0e3d989 for the proposed simplification of the code. There are a couple more changes that I'd like to add.

If you're happy with this, then I propose that we combine this into #14 to ensure that you get the author credit for the feature.

curtis.brown added 4 commits November 27, 2023 13:21
@cbrow111
Copy link

cbrow111 commented Nov 28, 2023

This looks cleaner for sure and is closer to my original approach but I was afraid you’d prefer that I operate within the pattern you’d already developed. I’m happy with this. I can merge this in to #14 like you suggested. Just let me know when you’re ready.

@twpayne
Copy link
Owner Author

twpayne commented Nov 28, 2023

Thanks for the feedback. It needs a bit more work however - I accidentally disabled too many tests in this PR. Let me push the current state.

@twpayne
Copy link
Owner Author

twpayne commented Nov 28, 2023

The current state (as of commit dc75416) isn't quite right yet. It's not using the top-level types correctly, as can be seen in the failing tests.

I was afraid you’d prefer that I operate within the pattern you’d already developed.

Thank you for your consideration! In this case, the existing pattern is to store elements observed in the input XML documents. For elements that are not observed then it's OK to use some kind of special case/side channel code. This also avoids potential conflicts if the element names overlap.

BTW, I see that #14 is your first PR on GitHub. It's a good PR - thank you! For issues like this - where there are multiple design options that might fit better or worse into the existing structure - don't hesitate to follow Dave Cheney's advice of talk, then code.

Happy to hand this back to you if you'd like to take it from here.

@cbrow111
Copy link

cbrow111 commented Nov 28, 2023 via email

@twpayne
Copy link
Owner Author

twpayne commented Nov 28, 2023

Over to you! No rush on anything. I'll close this PR so you can work on #14 in your own time.

@twpayne twpayne closed this Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants