Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: Abstract element and xsi:nil >Thread Next - RE: Abstract element and xsi:nil Re: Abstract element and xsi:nilTo: Morris Matsa <mmatsa@--.---.---> Date: 9/4/2007 12:25:00 AM Hi Morris, Morris Matsa <mmatsa@u...> writes: > xsi:nil doesn't cancel out which attributes are allowed, so the typing > is still relevant. What you say appears to be counter-intuitive but true, Structures, Section 2.6.2: "XML Schema: Structures introduces a mechanism for signaling that an element should be accepted as =B7valid=B7 when it has no content despite a content type which does not require or even necessarily allow empty content. An element may be =B7valid=B7 without content if it has the attribute xsi:nil with the value true. An element so labeled must be empty, but can carry attributes if permitted by the corresponding complex type." I find it quite strange and wonder what is the motivation behind allowing attributes with xsi:nil=true. This also raises a number of questions which do not seem to be answered anywhere in the spec: 1. Are such attributes validated? 2. What if the corresponding complex type does not merely permit but requires an attribute? Should this attribute be present when xsi:nil is true? Boris -- Boris Kolpackov Code Synthesis Tools CC http://www.codesynthesis.com Open-Source, Cross-Platform C++ XML Data Binding From mmatsa@u... Tue Sep 04 03:37:29 2007 Received: from lisa.w3.org ([128.30. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
