Skip to content

Phase 2: XQuery analytics (aggregation, top-holdings, look-through) - #2

Merged
karlkauc merged 1 commit into
mainfrom
feature/enterprise-showcase-phase2
May 15, 2026
Merged

karlkauc merged 1 commit into
mainfrom
feature/enterprise-showcase-phase2

Conversation

@karlkauc

Copy link
Copy Markdown
Contributor

Phase 2 of the enterprise FundsXML showcase. Builds on Phase 1 (PR #1, merged). One commit on top of main.

Added

  • XQuery_Examples/ — XQuery 3.1, all verified locally with Saxon-HE:
    • aggregate-by-assettype.xq — exposure grouped by AssetType (Position↔Asset joined by UniqueID) + grand-total reconciliation
    • top-holdings.xq — N largest holdings, names resolved; external variable n
    • fund-summary.xq — fund/doc overview + reconciliation; version-agnostic (handles 4.0.0 having no Version)
    • look-through.xq — fund-of-funds look-through readiness (flags SC positions + weights)
  • invocation/ — Saxon CLI and native Java s9api (both verified); Python saxonche reference; BaseX documented. README notes Saxon Query's bare name=value external-variable syntax.
  • CI gains an XQuery smoke step (queries run, output well-formed, Holding count asserted). Top-level index row → ✅.

No XML namespace in FundsXML 4.x → queries run unchanged on 4.2.9 / 4.1.0 / 4.0.0.

Roadmap remaining: Phase 3 XML signature (Apache Santuario) · 4 DB integration · 5 large-file/stream · 6 data binding/JSON.

🤖 Generated with Claude Code

XQuery_Examples/: aggregate-by-assettype, top-holdings (external var n),
fund-summary (version-agnostic + reconciliation), look-through (fund-of-funds
readiness). Position<->Asset joined by UniqueID; no XML namespace so they run
unchanged on 4.2.9/4.1.0/4.0.0.

invocation/: Saxon CLI (run-xquery.sh) and native Java s9api (RunXQuery.java)
verified; Python saxonche reference; BaseX documented. README documents Saxon
Query's bare name=value external-variable syntax.

CI: added an XQuery smoke step (all four queries run, output well-formed,
Holding count asserted). Top-level index updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@karlkauc
karlkauc merged commit 6b965fe into main May 15, 2026
2 checks 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.

1 participant