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

Datastore Dump XML Element Names #180

Merged
merged 6 commits into from
Jul 12, 2024

Conversation

JVickery-TBS
Copy link

Fix/ds writer xml element names

  • Added regex substitutions for XML element names.

- Added regex substitutions for XML element names.
- Added change log file.
JVickery-TBS and others added 2 commits July 12, 2024 11:10
- Added in accented characters to allow list.
- Used space special char.
- Added uniqueness to the element names after regex substitutions.
@JVickery-TBS JVickery-TBS requested a review from wardi July 12, 2024 15:44
- Added rule to start with underscore or letter.
@JVickery-TBS JVickery-TBS requested a review from wardi July 12, 2024 16:42
Copy link
Member

@wardi wardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. unicodedata.normalize('NFC', …) would future-proof this code but is also something we could enforce when creating the columns in the datastore.

Good for upstream too.

@JVickery-TBS
Copy link
Author

@wardi would the unicodedata.normalize('NFC', …) happen in the XML writer when building the element_names dict?

@wardi
Copy link
Member

wardi commented Jul 12, 2024

Yes, just before replacing word characters so the regex works regardless of the source normalization

- Normalize string.
@JVickery-TBS JVickery-TBS merged commit 0018caa into canada-py3 Jul 12, 2024
1 check passed
@JVickery-TBS JVickery-TBS deleted the fix/ds-writer-xml-element-names branch July 12, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants