FHIR Chat · value="" valid, or not? · conformance

Stream: conformance

Topic: value="" valid, or not?


view this post on Zulip Patrick Werner (May 13 2018 at 08:02):

I couldn't find it in the spec - is something like: xml <value value=""/> valid or not?
According to the XML spec it would be valid, and i couldn't find a constraint which restricts this in FHIR.
If i validate such a structure against HAPI/VONK it fails to validate because of the empty value.

view this post on Zulip Michel Rutten (May 13 2018 at 08:09):

@Patrick Werner see this page:
http://hl7.org/fhir/formats.html
"This value attribute/property can never be empty. Either it is absent, or it is present with at least one character of non-whitespace content"

view this post on Zulip Patrick Werner (May 13 2018 at 08:47):

there it is! Thanks for pointing me to the right place in the spec

view this post on Zulip Michel Rutten (May 13 2018 at 11:34):

No prob. I remember looking into this when Ewout implemented the serializers in the .NET library.

view this post on Zulip Brian Postlethwaite (May 13 2018 at 12:04):

I thought that the parsers were happy with this, and the validator was where it was reported.

view this post on Zulip Michel Rutten (May 13 2018 at 16:33):

Yes, deserialization is (somewhat) forgiving, but serialization strictly follows this rule; empty values are never serialized to the output.

view this post on Zulip Stefan Lang (May 13 2018 at 16:43):

If people do it right, which they sometimes don't

view this post on Zulip Michel Rutten (May 13 2018 at 16:52):

Correct, but I was just referring to our own .NET API.

view this post on Zulip Patrick Werner (May 14 2018 at 13:56):

looking at the regex of String: \s*(\S|\s)*

view this post on Zulip Patrick Werner (May 14 2018 at 13:56):

which tells me i could have a empty value?

view this post on Zulip Michel Rutten (May 14 2018 at 13:57):

That is a horrible regex that should be removed or replaced.

view this post on Zulip Patrick Werner (May 14 2018 at 13:57):

i'll do a tracker item

view this post on Zulip Elliot Silver (May 14 2018 at 13:57):

I've filed a ballot comment on that.

view this post on Zulip Patrick Werner (May 14 2018 at 13:57):

ah perfekt.

view this post on Zulip Michel Rutten (May 14 2018 at 13:59):

Note: literally implementing such a regex in your server will open up a vector for a DOS attack...
https://en.wikipedia.org/wiki/ReDoS

view this post on Zulip Elliot Silver (May 14 2018 at 14:00):

GF#16940


Last updated: Apr 12 2022 at 19:14 UTC