Skip to main content
Question

What is the purpose of the extra xsi_nil attributes from a GeoServer WFS source?


Forum|alt.badge.img

Can anyone explain the purpose of the extra xsi_nil attributes that accompany a Web Feature Service (WFS) data source?

For example, when I create a WFS reader in FME for the topp:states demo layer of a stock GeoServer, the resulting table schema in my FME workspace includes extra attributes - one for each native attribute - named <attribute>_xsi_nil. Here's a screenshot highlighting the fields in question:

The data type for all of these xsi_nil fields is xml_boolean. This happens for all WFS layers I consume from a GeoServer.

What is the purpose of these extra fields?

And is there a way to configure the reader - or the GeoServer layer - to not cause these extra fields to be created?

Thanks

3 replies

Forum|alt.badge.img
  • Author
  • March 31, 2020

Not an answer but a continuation of this topic ...

After some more research, it's clear these extra fields are added when the fields are defined as nillable in the xsd schema:

0684Q00000ArKA4QAN.png

When I customize the xsd schema for this layer on the GeoServer, changing the nillable attributes to false, and then create a new WFS reader in FME, the extra xsi_nil fields are no longer present.

And after some research on the GML spec, I find that xsi_nil is an XML attribute used to indicate a nil value for an element instance, e.g.,:

<topp:SUB_REGION xsi_nil="true"></topp:SUB_REGION>

Is that the purpose for these extra fields in FME?  To accommodate the xsi_nil attribute setting?

Thanks


Forum|alt.badge.img
  • Author
  • March 31, 2020
bbasarich wrote:

Not an answer but a continuation of this topic ...

After some more research, it's clear these extra fields are added when the fields are defined as nillable in the xsd schema:

0684Q00000ArKA4QAN.png

When I customize the xsd schema for this layer on the GeoServer, changing the nillable attributes to false, and then create a new WFS reader in FME, the extra xsi_nil fields are no longer present.

And after some research on the GML spec, I find that xsi_nil is an XML attribute used to indicate a nil value for an element instance, e.g.,:

<topp:SUB_REGION xsi_nil="true"></topp:SUB_REGION>

Is that the purpose for these extra fields in FME?  To accommodate the xsi_nil attribute setting?

Thanks

Sorry, I see where I should have added the above as a comment to my original post ... my bad.


Forum|alt.badge.img
  • Author
  • April 20, 2020

Thought I'd give this post a kick. Can anyone at Safe Software give some insight on this?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings