[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: Does it make sense to have a default with a nillable element?
- From: ht@markup.co.uk (Henry S. Thompson)
- To: "Costello\, Roger L." <costello@mitre.org>
- Date: Wed, 10 Jul 2019 17:03:11 -0400
"Costello, Roger L." <costello@mitre.org> 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: ht@markup.co.uk
URL: http://www.markup.co.uk/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]