Re: nillable values for attributes

I'm probably wrong and happy to be corrected but ...

The problem as I see it is that XML Schema uses an out of band
indication for nil. This allows it to distinguish between an empty
string and a null value, for instance.

Thus

<SomeElement></SomeElement>

is not the same as

<SomeElement xsi:nil="true"></SomeElement>


With attributes, there is nowhere logically to put the out of band
indication, except maybe as an accompaning attribute or some
encoding within the attribute name. To me,  the example below
is not indicating a null value, but an empty string, which are two
separate things.

Regards
Michael



                                                                                                                        
                    "Sean Gerety"                                                                                       
                    <SGerety@extremelo        To:     <xmlschema-dev@w3.org>                                            
                    gic.com>                  cc:                                                                       
                    Sent by:                  Subject:     nillable values for attributes                               
                    xmlschema-dev-requ                                                                                  
                    est@w3.org                                                                                          
                                                                                                                        
                                                                                                                        
                    26/09/2001 09:46                                                                                    
                    PM                                                                                                  
                                                                                                                        
                                                                                                                        




Is there any discussion for allowing attribute values to have a "nillable"
value.  I know that as XML Schemas currently stand, only elements may be
nillable.  Plus, is there a work around for this?  Say I wanted an
attribute with a Boolean datatype, but it could also be nillable.


This is what I would like:


<xs:attribute name="test" type="xs:Boolean" nillable="true"/>


So an instance document's attribute value could contain any of the
following and be ture:


<someElement test=""/>


<someElement test="true"/>


<someElement test="false"/>





Thanks,


Sean






Sean Gerety


Extreme Logic, Atlanta


sgerety@extremelogic.com









------------------------------------------
This e-mail is confidential.  If you are not the intended recipient, any use, disclosure or copying of this document is unauthorised and prohibited.  If you have received this document in error, please delete the email and notify me by return email or by phoning the NEMMCO Helpdesk on 1300 300 295.

Received on Wednesday, 26 September 2001 20:43:03 UTC