Repository navigation
Skip None text when binding wildcard list elements - #1237
Merged
Merged
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1237 +/- ##
=======================================
Coverage 99.97% 99.97%
=======================================
Files 117 117
Lines 9412 9414 +2
Branches 1446 1447 +1
=======================================
+ Hits 9410 9412 +2
Misses 1 1
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Oct 16, 2026
Merged
tefra
added a commit
to tefra/xsdata-w3c-tests
that referenced
this pull request
Oct 16, 2026
Skip None text in wildcard list elements (tefra/xsdata#1237) and pick up the w3c test data changes from 7bc3365.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Mixed content and other list wildcards got a stray
Noneat the start of the list when the element had no text (or only whitespace) before its first child but did have a tail.Resolves #1130
🔗 What I've Done
ElementNode.bind_wild_textnormalizes the text first. The early return only covered the case where both text and tail wereNone, so the list branch insertedNonewhenever the tail alone was set. The list branch never uses the tail, because the parent node already appends it. The list branch now returns early when the text isNone.Example from the voko
abak.xmlsample,<fnt>\n <bib>RugxDom</bib> ...:💬 Comments
Serialized XML doesn't change, because the serializer already skipped
Noneentries. Only code that reads the parsedcontentlists sees the difference.--mode xsd --save-output: the only output change caused by this fix is the pycode dumpall306.v01.py, whereB(content=[None])becomesB().resolve_entitiesnow that XXE in LxmlEventHandler.parse() #1228 turns it off by default.🛫 Checklist