Please republish your sample documents after reading Formatting code and log snippets in posts.
The way they are right now, we cannot cut-n-paste them in our system to experiment.
Also publish sample documents of the desired output.
It would also help if you published what you tried and describe how it fails or how it differs from the expected output. This way we do not start from scratch and not end up in a direction that you already know that fails.