Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reading SLDs with self closing Filter #621

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

KaiVolland
Copy link
Contributor

This fixes reading of SLDs wit an empty filter. Compare the tests.

Please note @geographika.

@KaiVolland KaiVolland requested a review from jansule June 8, 2022 15:40
@geographika
Copy link
Contributor

The example SLD with an empty filter was generated from MapServer, so there are definitely cases where this could occur.
Thanks for the fix @KaiVolland !

@jansule
Copy link
Contributor

jansule commented Jun 9, 2022

This might be an error with MapServer, since according to the FilterEncoding specification, having empty filters is invalid.

<xsd:element name="Filter" type="ogc:FilterType"/>
<xsd:complexType name="FilterType">
  <xsd:choice>
    <xsd:element ref="ogc:spatialOps"/>
    <xsd:element ref="ogc:comparisonOps"/>
    <xsd:element ref="ogc:logicOps"/>
    <xsd:element ref="ogc:_Id" maxOccurs="unbounded"/>
  </xsd:choice>
</xsd:complexType>

See http://schemas.opengis.net/filter/1.1.0/filter.xsd

@KaiVolland
Copy link
Contributor Author

IMHO the additional check will do no harm but we could make life easier for MapServer users. Maybe we could ad a lightweight SLD Validation to the parser.

@KaiVolland KaiVolland merged commit 3fd589f into geostyler:master Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants