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

In the 2009-2010 report extracted page numbers may not survive the structuring and cleaning process #19

Open
tlongers opened this issue Jul 25, 2024 · 0 comments

Comments

@tlongers
Copy link
Member

In the final output the page number is missing:

image

In the output prior to cleaning, the page number is still missing:

image

In the reshaped and processed XML the page number is also not present:

image

Although the page number is present in the XML for the item just below it:

image

This issue is likely to do with the positioning of the <page> tag or the positioning of the <start_date> tag in situations where the start and end dates values are compressed into just the <start_date> tag (which we handle later on), which may cause there the item to be missing a closing <\/training> tag. This is important because we append the final <page_number> tag to each item in the XML by inserting it just before the <\/training> tag. So no tag, no <page_number>.

Initial fix

The aim is to ensure that at the earliest stage possible fix those cases. This does the job for about 1100 items in the 2009-2010 report:

| perl -00pe '
s/<\/start_date>\n<training>/<\/start_date>\n<\/training>\n<training>/g

However, it is still not working to fix about 200 items without page numbers.

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

No branches or pull requests

1 participant