Add default namespace prefix for simple type references in generated XSDs#363
Open
klasfahlberg wants to merge 4 commits intomojohaus:masterfrom
Open
Add default namespace prefix for simple type references in generated XSDs#363klasfahlberg wants to merge 4 commits intomojohaus:masterfrom
klasfahlberg wants to merge 4 commits intomojohaus:masterfrom
Conversation
Member
|
Could You try to add some tests? |
|
Added some tests from Klas. |
Author
|
slachiewicz Are the added tests sufficient? |
slachiewicz
approved these changes
Aug 17, 2025
Author
|
@slachiewicz any insight on when this will make it to a release? |
Member
|
Hi, I missed this one. Could you try to rebase changes to resolve conflicts? |
…fix for references to simple types, such as enum types => we want to add the default namespace prefix to those nodes in order to get xjc-compatible XSD:s.
07fb13a to
16a404b
Compare
Author
|
@slachiewicz done |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Handle prefix2Uri and uri2Prefix consistently.
Author
|
@slachiewicz code/comments updated |
Author
|
@slachiewicz I've pushed a commit with the formatting (mvn spotless:apply) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This patch addresses an issue where schemagen does not generate the default namespace prefix for references to simple types (such as enum types), resulting in XSDs that are not fully compatible with xjc. The following changes were made:
Added logic to detect element references without a namespace prefix and prepend the default namespace prefix where appropriate.
These changes ensure that generated XSDs include the correct namespace prefixes, improving compatibility with tools expecting explicit prefixes.
These two PR:s, written by a former colleague, are no longer relevant and can be closed.