[wfs-dev] null values

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Fri Oct 27 10:59:45 EDT 2006


With Ionic WFS I could configure it to get the intended behaviour. My
application schema used to have:

<xsd:element name="VOOR" minOccurs="0" nillable="true" type="xsd:string"/>

If I change it to:

<xsd:element name="VOOR" minOccurs="1" nillable="true" type="xsd:string"/>

I get the behaviour I intend to have.

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl


--------- Oorspronkelijk bericht --------
Van: Bernard Snyers <bs at ionicsoft.com>
Naar: bartvde at osgis.nl <bartvde at osgis.nl>
Onderwerp: NULL
Datum: 27/10/06 12:50

> Dear Bart,
> 
> The null behaviour is defined in the schema using the attribute nillable 
> and minOccurs.
> 
> An optional element is often specified using minOccurs = 0. When 
> missing, it is also often interpreted as NULL.
> 
> A mandatory element is specified using minOccurs = 1. So the element 
> must be present in the XML.
> Sometimes it appears that we want to assign the NULL value to a 
> mandatory element, the only to to that is to set the nillable attribute.
> &lt;element name=&quot;toto&quot; xsi:nillable=&quot;true&quot;
minOccurs=&quot;1&quot; /&gt;
> 
> and to use the nil attribute in the element
> &lt;toto xsi:nil=&quot;true&quot; /&gt;
> 
> The rationale behind minOccurs= 1 and nillable =&quot;true&quot; is to
force the 
> user to not forget a essential XML element and give him the capability 
> to express  null.
> 
> The case minOccurs=&quot;1&quot; and nillable=&quot;false&quot; does not
permit the 
> expression of NULL.
> 
> The last case minOccurs=&quot;0&quot; and nillable=&quot;true&quot; allows
you two writing:
> - dont write the element
> - use nill=&quot;true&quot;
> 
> Hope this help
> 
> Bernard SNYERS
> IONIC Software
> 
> 
> 
> 
> 





More information about the wfs-dev mailing list