Next in thread →
Next in month →
Re: Does it make sense to have a default with a nillable element?
"Costello, Roger L." <> writes:
> The following XML Schema declares an element to be nillable and the element has a default value:
>
> <xs:element name="test" type="xs:string" nillable="true" default="Hello, world" />
>
> That is legal but is it meaningful?
>
> What does this (schema-valid) XML instance mean:
>
> <test xsi:nil="true"></test>
What does it mean? XML Schema doesn't have answers to such
questions. What does the PSVI say? It says
·absent· <#key-null>
Why? Because it says so here [1]:
*PSVI Contributions for element information items*
[schema normalized value]
The appropriate case among the following:
1 If the element information item is not ·nilled· ...
2 Otherwise ·absent· <#key-null>
[schema actual value]
If the [schema normalized value] is not ·absent·, then ...;
otherwise ·absent·
ht
[1] https://www.w3.org/TR/xmlschema11-1/#sec-sic-eltType
--
Henry S. Thompson, Markup Systems Ltd.
Cavers Garden Farm, Denholm; by Hawick; TD9 8LN
+44 (0) 7866 471 388
Fax: (44) 131 651-1426, e-mail:
URL: http://www.markup.co.uk/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Next in thread →
Next in month →