Skip to content

Fix UnboundLocalError in get_ns_string() for ONIX 3.1#7

Merged
titusz merged 1 commit intotitusz:masterfrom
remo7k:fix/onix-31-unboundlocalerror
Oct 14, 2025
Merged

Fix UnboundLocalError in get_ns_string() for ONIX 3.1#7
titusz merged 1 commit intotitusz:masterfrom
remo7k:fix/onix-31-unboundlocalerror

Conversation

@remo7k
Copy link
Copy Markdown
Contributor

@remo7k remo7k commented Oct 14, 2025

  • Add support for ONIX 3.1 in OnixMeta.get_ns_string() method with correct 3.1 namespace
  • Add error handling for unsupported ONIX versions
  • Create test data files for ONIX 3.1 (reference and short formats)
  • Add comprehensive test coverage for ONIX 3.1 support

Fixes the UnboundLocalError that occurred when validating ONIX 3.1 files because the 'tpl' variable was not defined for version 3.1. ONIX 3.1 uses its own namespace: http://ns.editeur.org/onix/3.1/{reference,short}

Fixes #6

- Add support for ONIX 3.1 in OnixMeta.get_ns_string() method with correct 3.1 namespace
- Add error handling for unsupported ONIX versions
- Create test data files for ONIX 3.1 (reference and short formats)
- Add comprehensive test coverage for ONIX 3.1 support

Fixes the UnboundLocalError that occurred when validating ONIX 3.1 files
because the 'tpl' variable was not defined for version 3.1. ONIX 3.1 uses
its own namespace: http://ns.editeur.org/onix/3.1/{reference,short}

Fixes #6
@titusz titusz merged commit 050e5b7 into titusz:master Oct 14, 2025
15 checks passed
@titusz
Copy link
Copy Markdown
Owner

titusz commented Oct 14, 2025

Thank you for you contribution

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

Successfully merging this pull request may close these issues.

UnboundLocalError in get_ns_string() for ONIX 3.1 files

2 participants