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.
While loading BGT data yesterday, I noticed that, after an XML file has been assembled using XmlAssembler, every subsequent XML file will only contain one feature. The cause is that somewhere in the ETL chain end_of_document or end_of_stream is set in the packet. Or rather, packet.init is not called, as it is called in my unit tests. I suspect this is due to the use of the ZipFileInput in the real life situation (BGT extract), instead of XmlElementStreamerFileInput in XmlAssemblerTest (test_xml_assembler.py). Before the XML is being processed, the ZIP file has already been entirely "read".
I think my fix is justifiable, although I still consider it as a workaround. When more XML elements are being read, it is obvious that End of Document, or End of Stream has not been reach yet.
A more permanent solution would be the redesign mentioned in issue #51.