Skip to content

AER-3162 - Group XSD validation errors by source location#381

Merged
JornC merged 7 commits intoaerius:mainfrom
JornC:group-xsd-errors
May 7, 2026
Merged

AER-3162 - Group XSD validation errors by source location#381
JornC merged 7 commits intoaerius:mainfrom
JornC:group-xsd-errors

Conversation

@JornC
Copy link
Copy Markdown
Member

@JornC JornC commented May 4, 2026

Validation events from JAXB are now grouped by their (line, column) locator so a single bad value no longer produces multiple separate errors.

Within each group only the highest-severity events are kept and their messages combined. Each combined message is prefixed with [line N, col M] so users can locate the offending value in larger GML files.

JornC added 6 commits May 4, 2026 11:11
Validation events from JAXB unmarshalling are now grouped by their (line, column)
locator so a single bad value no longer produces multiple separate errors. Within
each group only the highest-severity events are kept and their messages combined.
Each combined message is prefixed with [line N, col M] so users can locate the
offending value in larger GML files.
Drop the within-group severity filter so all events at a location are joined
into the combined message. Lower-severity events (e.g. JAXB's bare
NumberFormatException 'None') were technically redundant but the no-loss
guarantee is more valuable than the cosmetic gain from dropping them.
Restore the within-group severity filter from the first iteration but extract
it into a named, javadoc'd helper (discardRedundantLowerSeverityEvents) that
states it is a deliberate lossy step and documents exactly which events get
dropped: JAXB's bare ERROR-severity wrapping of a primitive parse failure
(e.g. just "None") at the same location as the FATAL_ERROR cvc-* events
that already convey the same information with full context.
Comment thread source/imaer-gml/src/main/java/nl/overheid/aerius/gml/GMLReaderFactory.java Outdated
@JornC JornC requested a review from Hilbrand May 4, 2026 13:22
Copy link
Copy Markdown
Member

@Hilbrand Hilbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JornC JornC merged commit 6f44f08 into aerius:main May 7, 2026
1 check passed
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.

2 participants