wfs: Fix error when parsing empty OtherCRS - #1045
Conversation
According to the official XSD, `<OtherCRS />` and `<OtherSRS />` are valid for WFS capabilities. Previously, the Crs tried to split the id, which may be None in this case and resulted in an error. With this change, both wfs110 and wfs200 reject None values entirely.
|
Thanks @bierik for the fix and test. From https://schemas.opengis.net/wfs/2.0/wfs.xsd: I assume I presume you ran into this in a real-world use-case. Do you know which server produced the GetCapabilities response? |
|
@geographika As far as I can tell, Unfortunately, the services that produced this response are internal services from the customer. I completely agree with you that these services should omit the empty tags. But for me, it was just easier to fix it in the client library 😄. And if the XSD allows it, the client should handle it, right? |
According to the official XSD,
<OtherCRS />and<OtherSRS />are valid for WFS capabilities.Previously, the Crs tried to split the id, which may be None in this case and resulted in an error.
With this change, both wfs110 and wfs200 reject None values entirely.