Re: abstract + nillable = ?

> On 15 Dec 2016, at 16:42, Ihe Onwuka <ihe.onwuka@gmail.com> wrote:
> 
> If an element is specified as both abstract and nillable what domain if any does the nillable hold over the substituting element.
> 
> I am trying to figure out what was intended by the author of a schema that does this.


See Content type restricts (Complex Content), clause 4.1

G subsumes S if G.{nillable} = true or S.{nillable} = false

That basically means that if a supertype contains a non-nillable element, it can't be substituted in a subtype with a nillable element. So if you're creating an abstract element and you want the concrete elements to be nillable, then the abstract element has to be nillable.

Michael Kay
Saxonica

Received on Thursday, 15 December 2016 16:59:16 UTC