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

Missing attribute default values #73

Closed
skfcz opened this issue Nov 4, 2024 · 3 comments
Closed

Missing attribute default values #73

skfcz opened this issue Nov 4, 2024 · 3 comments

Comments

@skfcz
Copy link

skfcz commented Nov 4, 2024

Describe the bug
The default values defined in an attribute definition are not parsed into the model

Expected behavior
The default values should be available in the XsdAttriibute#defaultElement

Library Version
Current master b7855d6

Solution

The default value is available in the map with the key 'default'.

The valuse of the map are then copied into XsdAttribute#defaultElement using
public class XsdAttribute extends XsdNamedElements { ... this.defaultElement = attributesMap.getOrDefault(DEFAULT_ELEMENT_TAG, defaultElement);

with the key
public abstract class XsdAbstractElement { ... public static final String DEFAULT_ELEMENT_TAG = "defaultElement";

Changing to
public static final String DEFAULT_ELEMENT_TAG = "default";

fixes the problem

@lcduarte
Copy link
Member

lcduarte commented Nov 4, 2024

Hello,

Thanks for the issue and the fix. I'll try to deploy a new version with the fix some time this week

@lcduarte
Copy link
Member

lcduarte commented Nov 5, 2024

Hello,

The new version with the fix is available, 1.2.17.

@lcduarte lcduarte closed this as completed Nov 5, 2024
@CarstenZerbst
Copy link

Thanks for your work on that!

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

No branches or pull requests

3 participants