Re: [xml-dev] Does it make sense to have a default with a nillable element?

From
David Carlisle <>
To
"Costello, Roger L." <>
Date
2019-07-10T13:51:13Z
ID
<>
Thread
Re: [xml-dev] Does it make sense to have a default with a nillable element?

https://www.w3.org/TR/xmlschema11-1/#c-evc

says something about default values and xsi:nill
> E has neither element nor character [children], and E is not ·nilled·...


in full it says


5 The appropriate case among the following is true:
5.1 If D has a {value constraint}, and E has neither element nor character [children], and E is not ·nilled· with respect to D , then all of the following are true:
5.2 If D has no {value constraint}, or E has either element or character [children], or E is ·nilled· with respect to D, then all of the following are true:
5.2.1 E is locally ·valid· with respect to the ·governing type definition· as defined by Element Locally Valid (Type) (§3.3.4.4).
5.2.2 If D.{value constraint}.{variety} = fixed and E is not ·nilled· with respect to D, then all of the following are true:
5.2.2.1 E has no element information item [children].
5.2.2.2 The appropriate case among the following is true:
5.2.2.2.2 If E's ·governing type definition· is a Simple Type Definition or a Complex Type Definition with {content type}.{variety} = simple, then the ·actual value· of E is equal or identical to D.{value constraint}.{value}.

so that's clear then.