This large minor release incorporates a bunch of bug fixes, new features, and code refactoring that will improve the stability, performance, and usefulness of runtimes built on this library.
What's New
- A significant amount of Javadocs were added to classes in the code base, with a focus on the core and databind portions of the library. The goal here is to make the codebase easier to udnerstand for maintainers.
- A variety of unit tests were added to the codebase to ensure that math and date/time handling is working as intended. Test code coverage has improved greatly as a result.
- New Metapath functions:
- fn:adjust-dateTime-to-timezone
- fn:adjust-date-to-timezone
- fn:adjust-time-to-timezone
- fn:current-date
- fn:current-dateTime
- fn:current-time
- fn:dateTime
- fn:day-from-date
- fn:day-from-dateTime
- fn:days-from-duration
- fn:dateTime
- fn:deep-equal
- fn:distinct-values
- fn:exactly-one
- fn:function-arity
- fn:function-lookup
- fn:function-name
- fn:hours-from-dateTime
- fn:hours-from-duration
- fn:hours-from-time
- fn:index-of
- fn:innermost
- fn:local-name
- fn:minutes-from-dateTime
- fn:minutes-from-duration
- fn:minutes-from-time
- fn:month-from-date
- fn:month-from-dateTime
- fn:months-from-duration
- fn:name
- fn:namespace-uri
- fn:one-or-more
- fn:outermost
- fn:QName
- fn:root
- fn:seconds-from-dateTime
- fn:seconds-from-duration
- fn:seconds-from-time
- fn:string-join
- fn:timezone-from-date
- fn:timezone-from-dateTime
- fn:timezone-from-time
- fn:year-from-date
- fn:year-from-dateTime
- fn:years-from-duration
- fn:zero-or-one
- map:for-each
- meta:base64-decode-text
- meta:base64-encode-text
- New Metapath data types:
- qname - for URI qualified names
- hex-binary - for hex encoded data
- time - for time of day, without a date
- Added support for defining and using anonymous functions in Metapath.
- Fixed support for URI qualified names, e.g.
Q{uri}local-name
. The URI qualifier was previously being ignored. - Added the ability to define a help-uri property on a constraint, which is used by the SARIF generator to provide a documentation link for a validation finding. (#279)
- Improved messages in constraint validation output. Also improved the error handling for constraint message replacements using Metapath expressions. (#290)
- Added support for a DEBUG constraint level, allowing debugging messages to be segregated from other messages in console and SARIF output. (#307)
- Builds now use threaded JUnit test execution, which dramatically speeds up builds. (#337, #371)
- Support base64 encoding/decoding in Metapath (#340)
- Added a Metapath execution stack to track Metapath evaluation. This has been helpful in debugging Metapath errors. (#336)
- Adjust the matcher log level from warning to debug. This will reduce a good amount of CLI noise during parsing. (#401)
- Added support for dates with negative years to handled BC dates.
- Added support for a document object model (DOM) like Metapath item representation. This is currently being used in unit tests for quick Metapath data construction, but will provide the basis for DOM based parsing. (#288)
- Added support for in-memory SARIF writing to reducing IO overhead. (#363)
Important Bug Fixes
- Improved handling of static context when compiling Metapath expressions from external constraints. The static context from the constraint definition is used instead of the document being validated. This better supports prefix handling and other document specific cases. (#305)
- Fixed bug in Metapath inline function declarations, which was causing parameters after the first to not be handled properly (#321)
- Align use of
logicalLocation
to SARIF specification. Previously, this was being output as a single object, instead of an array. (#383) - JSON schema generation has been refactored and fixed to ensure that missing array items are not produced properly (#387, #394)
- External constraint processing now ensures that constraints that target the same Metaschema definition from multiple locations in the model graph produce a single added constraint. Previously, some constraints were duplicated causing multiple errors to be produced for the same constraint. (#385, #400, #408, #410)
- Some Metapath function results were not being cached properly due to the focus independence not being handled as intended. This was fixed and some named function characteristics were updated to reflect the appropriate behavior. (#399)
- Aligned date, dateTime, time, and duration implementations with Metapath specification. Many functions were not handling timezones properly in cases where an implicit timezone was to be used relative to the dyanmic context. (#346)
- Added missing support for processing let statements in the XML-based constraint loader. Address part of a solution for metaschema-framework/liboscal-java#112. (#382)
Breaking Changes
None.
What's Changed
- Feature/anonymous functions by @david-waltermire in #266
- Add
index-of()
function to Metapath default function registry by @aj-stein-gsa in #207 - Support for fn:current-date by @david-waltermire in #274
- Metapath
fn:deep-equal
support by @david-waltermire in #277 - Metapath
fn:distinct-values
function by @david-waltermire in #278 - Bump github/codeql-action from 3.27.5 to 3.27.6 by @dependabot in #273
- Bump org.eclipse.jdt:org.eclipse.jdt.annotation from 2.3.0 to 2.3.100 by @dependabot in #272
- Bump org.codehaus.mojo:license-maven-plugin from 2.4.0 to 2.5.0 by @dependabot in #270
- Code formatting and exception improvements by @david-waltermire in #286
- Add SARIF help uri to console output by @david-waltermire in #279
- Support for zero-or-one, one-or-more, and exactly-one Metapath functions by @david-waltermire in #281
- Metapath node functions by @david-waltermire in #288
- Feature/289 improve message errors by @david-waltermire in #290
- Fix return type for
map:entry
by @aj-stein-gsa in #300 - Add implementation of string-join to default function library by @aj-stein-gsa in #302
- Support DEBUG Constraint Level by @david-waltermire in #307
- Ensure proper compilation of Metapath expressions using parsed static context by @david-waltermire in #305
- Clean up function signatures and approach for #298 by @aj-stein-gsa in #310
- Bump com.fasterxml.jackson:jackson-bom from 2.18.1 to 2.18.2 by @dependabot in #269
- Bump org.thymeleaf:thymeleaf from 3.1.2.RELEASE to 3.1.3.RELEASE by @dependabot in #285
- Bump org.apache.xmlbeans:xmlbeans from 5.2.2 to 5.3.0 by @dependabot in #295
- Bump actions/setup-java from 4.5.0 to 4.6.0 by @dependabot in #303
- Bump actions/upload-artifact from 4.4.3 to 4.5.0 by @dependabot in #304
- Bump lycheeverse/lychee-action from 2.1.0 to 2.2.0 by @dependabot in #306
- Bump github/codeql-action from 3.27.6 to 3.28.0 by @dependabot in #311
- Add
function-lookup()
implementation to default function library by @aj-stein-gsa in #309 - Add named function reference support for other utility operations by @aj-stein-gsa in #313
- More javadocs, refactoring, and unit tests by @david-waltermire in #315
- Bump org.assertj:assertj-core from 3.26.3 to 3.27.1 by @dependabot in #324
- Bump com.github.seregamorph:hamcrest-more-matchers from 0.1 to 1.0 by @dependabot in #318
- Fix parsing of parameter handling for functions with multiple parameters by @aj-stein-gsa in #321
- Bump dev.harrel:json-schema from 1.7.1 to 1.7.2 by @dependabot in #317
- Improve code and schema generation compilation by @david-waltermire in #326
- Bump org.mockito:mockito-core from 5.14.2 to 5.15.2 by @dependabot in #329
- Bump com.github.javaparser:javaparser-symbol-solver-core from 3.26.2 to 3.26.3 by @dependabot in #327
- Bump org.eclipse.persistence:org.eclipse.persistence.moxy from 4.0.4 to 4.0.5 by @dependabot in #328
- Efficiently refresh resources changed in generation mojos by @david-waltermire in #331
- Record Metapath expression text by @david-waltermire in #330
- Bump org.apache.commons:commons-text from 1.12.0 to 1.13.0 by @dependabot in #333
- Bump org.freemarker:freemarker from 2.3.33 to 2.3.34 by @dependabot in #335
- Code cleanup by @david-waltermire in #338
- Suport junit parallel execution by @david-waltermire in #337
- Support base64 encoding/decoding in Metapath by @david-waltermire in #340
- Support a Metapath execution stack by @david-waltermire in #336
- Add Metapath function map:for-each by @david-waltermire in #339
- Update test and mock flag def builder for #323 by @aj-stein-gsa in #332
- Bump org.apache.logging.log4j:log4j-bom from 2.24.2 to 2.24.3 by @dependabot in #342
- Bump dev.harrel:json-schema from 1.7.2 to 1.7.3 by @dependabot in #341
- Bugfix/remove info level log requirement by @wandmagic in #364
- Feature/322 handle implicit timezone by @david-waltermire in #346
- fn:deep-equals implementation refactor by @david-waltermire in #370
- Feature/in memory sarif writing by @wandmagic in #363
- Bump github/codeql-action from 3.28.0 to 3.28.10 by @dependabot in #366
- Bump lycheeverse/lychee-action from 2.2.0 to 2.3.0 by @dependabot in #361
- Bump actions/setup-java from 4.6.0 to 4.7.0 by @dependabot in #358
- Bump actions/upload-artifact from 4.5.0 to 4.6.1 by @dependabot in #365
- Build improvements and race condition fix by @david-waltermire in #371
- Bump org.sonatype.central:central-publishing-maven-plugin from 0.6.0 to 0.7.0 by @dependabot in #373
- Bump dev.harrel:json-schema from 1.7.3 to 1.8.1 by @dependabot in #372
- date, date/time, and time extraction functions part 1 by @david-waltermire in #374
- Add static methods for timezone accessor Metapath functions by @david-waltermire in #376
- Handle let statements in the XmlMetaConstrainLoader by @david-waltermire in #382
- Bump org.mockito:mockito-core from 5.15.2 to 5.16.0 by @dependabot in #377
- Bump com.fasterxml.jackson:jackson-bom from 2.18.2 to 2.18.3 by @dependabot in #378
- Align use of logicalLocation to SARIF specification by @david-waltermire in #383
- Fix JSON schema generation missing array items by @david-waltermire in #387
- Refactor external constraint processing by @david-waltermire in #385
- Add date and time extraction methods by @aj-stein-gsa in #375
- Bump github/codeql-action from 3.28.10 to 3.28.11 by @dependabot in #384
- Bump org.xmlresolver:xmlresolver from 6.0.12 to 6.0.13 by @dependabot in #386
- Refactor JSON schema generation by @david-waltermire in #394
- Update README.md by @david-waltermire in #395
- Add Metapath function support functions by @aj-stein-gsa in #381
- Bump github/codeql-action from 3.28.11 to 3.28.13 by @dependabot in #393
- Bump actions/upload-artifact from 4.6.1 to 4.6.2 by @dependabot in #391
- Bump org.mockito:mockito-core from 5.16.0 to 5.16.1 by @dependabot in #390
- Bump org.xmlresolver:xmlresolver from 6.0.13 to 6.0.14 by @dependabot in #389
- Bump net.openhft:compiler from 2.27ea0 to 2.27ea1 by @dependabot in #388
- Feature/cleanup 20250331 by @david-waltermire in #397
- Bump lycheeverse/lychee-action from 2.3.0 to 2.4.0 by @dependabot in #398
- Test function result caching by @david-waltermire in #399
- Refactor meta-constraints context handling by @david-waltermire in #400
- Adjust matcher warning to debug by @david-waltermire in #401
- Bump com.github.javaparser:javaparser-symbol-solver-core from 3.26.3 to 3.26.4 by @dependabot in #402
- Avoid duplicate constraints by @david-waltermire in #403
- Light refactoring and improved Javadocs by @david-waltermire in #404
- Fix constraint #406 syntax error throwing exceptions by @aj-stein-gsa in #407
- Prevent duplicate external constraint application by @david-waltermire in #408
- Filter previously applied constraints at the context level by @david-waltermire in #410
- Bump io.github.hakky54:logcaptor from 2.10.1 to 2.10.2 by @dependabot in #411
- Bump org.mockito:mockito-core from 5.16.1 to 5.17.0 by @dependabot in #412
- Code cleanup by @david-waltermire in #409
Full Changelog: v2.1.0...v2.2.0