FHIR Chat · Empty value error in XML, ok in JSON · implementers

Stream: implementers

Topic: Empty value error in XML, ok in JSON


view this post on Zulip Alexander Henket (Dec 14 2018 at 11:56):

When you schema validate a FHIR XML instance with something like below (STU3), an error is triggered because string-primitive has length > 0. This does not happen in online validation like on Simplifier. Schema bug or .Net validator bug?

<identifier>
    <system value="http://example.org/careprovider"/>
    <value value=""/>
</identifier>

view this post on Zulip Brian Postlethwaite (Dec 14 2018 at 12:35):

This is correct behaviour.
The others are more permissive, the new Parser and validator are more strict.

view this post on Zulip Yunwei Wang (Dec 14 2018 at 15:44):

I remember there is an validator option to skip this.

view this post on Zulip Grahame Grieve (Dec 14 2018 at 20:17):

that is not valid; there should not be a validator option to skip that, but there might be a parser option to allow it

view this post on Zulip Ewout Kramer (Dec 18 2018 at 09:50):

When you schema validate a FHIR XML instance with something like below (STU3), an error is triggered because string-primitive has length > 0. This does not happen in online validation like on Simplifier. Schema bug or .Net validator bug?

<identifier>
    <system value="http://example.org/careprovider"/>
    <value value=""/>
</identifier>

The .NET parser < version 1.0 allowed this, the new ones catch this. Simplifier has not yet been updated. And indeed, the behaviour is configurable in the settings to the parser.

view this post on Zulip Brian Postlethwaite (Dec 18 2018 at 11:36):

The validator should always catch it, not sure about the parser by default.

view this post on Zulip Ewout Kramer (Dec 18 2018 at 17:17):

The validator does indeed catch this, indeed, already before 1.0. The parsers did not.


Last updated: Apr 12 2022 at 19:14 UTC