Skip to content

upgrade to Saxon 13.0 - #122

Open
pjfanning wants to merge 1 commit into
apache:trunkfrom
pjfanning:saxon-13
Open

pjfanning wants to merge 1 commit into
apache:trunkfrom
pjfanning:saxon-13

Conversation

@pjfanning

Copy link
Copy Markdown
Member

Supersedes #38, which only bumped the version.

Saxon 13 requires Java 17, so building xmlbeans now needs JDK 17. The xmlbeans jar itself still targets Java 8 bytecode, and Saxon remains a provided dependency. Users of the Saxon-backed XPath/XQuery support now need Saxon 13 (and therefore Java 17); this code no longer compiles against Saxon 12.

Changes:

  • SaxonXQuery: Saxon 13 API changes
    • HashTrieMap removed → GeneralMapBuilder(config.getMapSpecVersion())
    • 8-arg DurationValue constructor removed → DurationValue.makeDuration(...) (as a side effect, fractional seconds are no longer dropped)
    • DateValue.makeDateValue(UnicodeString, ConversionRules) removed → DateValue.tryParseDate(str, allowYearZero)
  • SaxonXPathEngine: use AtomicValue.getStringValue() for atomic results; in Saxon 13 toString() returns a debug form (e.g. DayTimeDuration 172800S instead of P2D), which broke TypesTest.testDuration
  • Version bump in build.gradle, build.xml, maven poms, LICENSE-binary.txt
  • test-gradle.yml and publish-snapshot.yml build with JDK 17

Tested locally with JDK 17: ./gradlew test passes (3180 tests, 170 skipped).

🤖 Generated with Claude Code

Saxon 13 requires Java 17 to build (the xmlbeans jar still targets Java 8).

- SaxonXQuery: replace removed HashTrieMap with GeneralMapBuilder,
  removed DurationValue ctor with DurationValue.makeDuration and
  DateValue.makeDateValue(UnicodeString, ConversionRules) with
  DateValue.tryParseDate
- SaxonXPathEngine: use getStringValue() for remaining AtomicValues,
  as toString() no longer returns the lexical form (e.g. durations)
- CI workflows: build with JDK 17

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pjfanning pjfanning mentioned this pull request Sep 23, 2026
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.

1 participant