Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Abstract element and xsi:nil

From: Boris Kolpackov <boris@-------------.--->
To: 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.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent