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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XML Schema: nillable vs. minOccurs

[ Lists Home | Date Index | Thread Index ]

Brian Speight scripsit:

> I'm looking for advice on usage of nillable vs. minOccurs. When you
> have an element that is optional should you use "nillable=true" or
> "minOccurs=0" or both? Using both seems to make things more complicated
> than necessary.

They mean two different things.  For a truly optional element, one that is
allowed to be absent altogether, minoccurs="0" is what you want.  Nillable
means that the element can be present without its normal content, provided
that xsi:nil="true" is one of its attributes.

-- 
Do NOT stray from the path!             John Cowan <jcowan@reutershealth.com>
        --Gandalf                       http://www.ccil.org/~cowan




 

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

Copyright 2001 XML.org. This site is hosted by OASIS