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

"nil=true" in XML disapears for elements of type xs:date #911

Open
oysteinthoensisjord opened this issue Nov 19, 2024 · 1 comment
Open
Labels
kind/bug Something isn't working status/triage

Comments

@oysteinthoensisjord
Copy link

oysteinthoensisjord commented Nov 19, 2024

Description of the bug

For schemas having elements of type xs:date and nillable = true, the XML which is stored in an instance loses the xsi:nil=true attribute at some point.

Related to xs:date, it is represented in C# as a string having a regex. Couldn't it be represented as DateOnly instead?

Steps To Reproduce

Define element in XSD:
<xs:element name="tillatelsedato" type="xs:date" nillable="true" minOccurs="0" maxOccurs="1"/>

Create instance with nil input for the datefield
XML input
<tillatelsedato xsi:nil="true" />

Retreive the dataelement, the ouput will be like this
<tillatelsedato/>

Additional Information

@oysteinthoensisjord
Copy link
Author

Nice! I've by deleting and adding the datamodel in our app once more. Now it seems to behave as expected.

A note: deleting the datamodel in Altinn Studio isn't trivial. The popup for confirming the deletion is hidden by the top menu. BUT! Opening developer tools and making the window quite small reveals the popup.
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/triage
Projects
Status: No status
Development

No branches or pull requests

1 participant