eclipse-ee4j / eclipse-ee4j/jaxb-ri

Found problem with <xjc:treatRestrictionLikeNewType /> in JAXB:XJC

Open
#855 5 comments 0 reactions 1 assignee Claimed by @glassfishrobot View on GitHub
metro2_2-waived Priority: Major Type: Bug
Dominant language
Java
Stars
222
Forks
131
Avg merge
2d 17h
Merged PRs (30d)
9

Description

Found problem with in JAXB:XJC. The problem occurs when trying to generate binding classes upon XSD's with jaxb xjc.

My xsd has a type hierarchy with restriction from CodeType, through ItemType, to ItemBaseType. The latter defines the id. When using , CodeType is losing id. Is this a known bug? Is there a solution for this?

The xsd cannot be changed since it is a third party artifact. The is used in my custom binding in order to generate friendly mapping classes.

..................

......................

.............................................................................

The examples above come from this xsd file: /opensdmx-domain-21-jaxb-bugreport/src/main/resources/SDMXStructureCodelist.xsd.
I have attached a zip file with a Maven project. The tests fail to compile because of the missing attributes.
#### Environment
Java, Windows
#### Affected Versions
[2.2.4u1]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.