null values in GML
Bart van den Eijnden (OSGIS)
bartvde at OSGIS.NL
Thu Dec 7 00:21:17 PST 2006
Hi Steve,
if the schema has minOccurs 1, then ofcourse you can't leave out the
element. If possible, the GML application schema should be changed to match
that.
If not possible, there is also something called nillable in XML Schema, so
if nillable is true, you could use:
<PRIORITY xsi:nil="true"></PRIORITY>
But as pointed out on the wfs-dev e-mail list, there are also a few issues
with the nillable solution.
So there is no easy fix ....
Best regards,
Bart
--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl
--------- Oorspronkelijk bericht --------
Van: Steve Lime <Steve.Lime at dnr.state.mn.us>
Naar: Bart van den Eijnden OSGIS <bartvde at OSGIS.NL>
Cc: MAPSERVER-USERS at lists.umn.edu
Onderwerp: Re: [UMN_MAPSERVER-USERS] null values in GML
Datum: 06/12/06 19:34
> I guess we need a standard definition of NULL for all drivers then since
> I don't believe it's
> the same across the board. A mapserver-dev topic. Since we use char *
> for all attributes
> we could literally use NULL.
>
> Also, often a schema will require an element, what to do with NULLs in
> that case?
>
> Steve
>
> >>> "Bart van den Eijnden (OSGIS)"
<bartvde at osgis.nl> 12/6/2006 1:07:55
> PM >>>
> Hi Steve,
>
> as I understand from previous discussions on wfs-dev, it would be best
>
> for Mapserver to leave out the attribute from the GML response in case
>
> it's null.
>
> For reference, check the threads named "null values" here:
>
> http://mail.opengeospatial.org/pipermail/wfs-dev/2006-October/
>
> although they get a bit hard to understand .... at least for me ....
> :-)
>
> Best regards,
> Bart
>
> Steve Lime schreef:
> > Mateusz is most likely correct. MapServer extracts attributes and
> > converts when necessary (not very often). If the asterix
> > always represents NULL then we could represent as something else
> (empty
> > string?) in the DBF code. What does GDAL/OGR
> > do with NULLs in its output?
> >
> > Steve
> >
> >
> >>>> Mateusz Loskot <mateusz at LOSKOT.NET> 12/6/2006
9:44:29 AM >>>
> >>>>
> > Bart van den Eijnden (OSGIS) wrote:
> >
> >> Hi list,
> >>
> >> I have a strange phenomenon.
> >>
> >> A shape attribute table has some null values in it (column type
> >> Real), for instance:
> >>
> >> OGRFeature(nap_speciaal):856 pnt_pntid (String) = 000A2510 ..
> >> hgt_hgtwd (Real) = (null) .. POINT (122880 487860)
> >>
> >> Using Mapserver WFS I get the following GML output:
> >>
> >> <ms:pnt_pntid>000A2510</ms:pnt_pntid> ..
> >> <ms:hgt_hgtwd>************************</ms:hgt_hgtwd>
..
> >>
> >> Does anybody have an idea what is causing the sequence of
> asterisks?
> >>
> >
> > Asterix is used to indicate NULL value in Shapefile attribute.
> > I'm completely not sure, but I suppose MS WFS driver does not handle
> > asterix as null but accepts it as a string value and puts into
> output
> > GML.
> >
> > Cheers
> >
>
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> bartvde at osgis.nl
> http://www.osgis.nl
>
>
>
More information about the MapServer-users
mailing list