OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[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?

"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·


[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]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS