Remove extra 'ns1' namespace from the beginning of every XML element name (ERN 3.8 and 3.8.1) #10
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.
Was working on generating DDEX XML today and realized that the generated code for 3.8 and 3.8.1 had a
ns1
namespace prepended to the element tag names, i.e.:https://github.com/sshaw/ddex/blob/v0.0.3/lib/ddex/ern/v381/new_release_message.rb#L29
This results in XML with double namespaces when you use
DDEX.write
which then fails to parse if you try to read it externally (at least in WebKit). This fix removes the extrans1
namespace from all the generated classes.I'm not sure what actually caused the problem: whether it is in the jaxb2xml library, or a dependency, or maybe just need to pass additional arguments when generating the code? I thought I'd add the fix before digging though in case you had an idea what caused the issue.