Skip to content

Missing attribute default values #73

@skfcz

Description

@skfcz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions