Skip to content

Phase 1: enterprise FundsXML showcase — samples, validation, Schematron, XSLT, CI - #1

Merged
karlkauc merged 3 commits into
mainfrom
feature/enterprise-showcase-phase1
May 15, 2026
Merged

karlkauc merged 3 commits into
mainfrom
feature/enterprise-showcase-phase1

Conversation

@karlkauc

Copy link
Copy Markdown
Contributor

Grows the repo from a narrow data-quality set into an enterprise FundsXML reference. Plan-driven; Phase 1 of a 6-phase roadmap.

What's included (all verified locally)

  • Samples: restructured to FundsXML_Files/<version>/<use-case>/. New 4.2.9 transactions / documents / regulatory (EFT) / signed-skeleton; 4.1.0 & 4.0.0 positions. All 7 XSD-valid against the official release schema. 4.0.0 correctly has no ControlData/Version (added in 4.1.0).
  • tools/fetch-schema.sh: proxy-aware fetcher handling GitHub's 302 redirect and the relative xmldsig-core-schema.xsd import (4.2.9+).
  • tools/fetch-tools.sh: fetches Saxon-HE + self-contained SchXslt CLI.
  • XSD validation (XSD_Validation/): CLI, Python, Java verified; .NET, PowerShell reference. Cross-stack consistent, secure XML processing (XXE-hardened).
  • Schematron (Basic_Checks/invocation/): CLI + native-Java verified; Python/.NET reference; shared svrl-summary.py defines pass/fail.
  • XSLT showcase: company-internal DQ rules, factsheet (HTML + XSL-FO→PDF), CSV export; Saxon CLI + Java s9api verified.
  • CI (.github/workflows/ci.yml): XSD + Schematron over all samples, negative fixtures must fail, transform smoke test, legacy XSLT 1.0 regression. All steps simulated green locally.

Notable fixes (pre-existing defects)

  • Schematron pattern shadowing: the percentage-sum rule was dead code (ISO first-match-per-pattern). Split into its own patterns so it actually fires (proven: 120% → ERROR).
  • Canonical sample reconciliation: it previously failed 4 ERROR rules despite docs claiming "passes all checks". Fund NAV 125M→112.5M (actual position-value sum), percentages → 100%, share classes given TotalAssetValues/SharesOutstanding. Now 0 errors (12 advisory warnings, documented).

Caveats

  • .NET / PowerShell / saxonche examples are correct reference implementations, not executed in the dev environment (no .NET SDK / Saxon CLI / saxonche there); CI covers the rest.
  • .lib/ and .schema-cache/ are gitignored (fetched dependencies, not source).

Roadmap (follow-up PRs): Phase 2 XQuery · 3 XML signature (Apache Santuario) · 4 DB integration (code only) · 5 large-file/stream · 6 data binding/JSON.

🤖 Generated with Claude Code

karlkauc and others added 3 commits May 15, 2026 15:22
- Restructure FundsXML_Files into <version>/<use-case>/ layout
- Add 4.2.9 transactions/documents/regulatory(EFT)/signed samples
- Add 4.1.0 and 4.0.0 positions samples (4.0.0 has no ControlData/Version)
- All 7 samples XSD-valid against official release schema
- tools/fetch-schema.sh: proxy-aware fetcher (handles GitHub 302 +
  relative xmldsig-core-schema.xsd import for 4.2.9+)
- Per-example READMEs with version badge + validated-against URL
- Top README use-case index + structure tree; EXAMPLE_README_TEMPLATE
- All content in English

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
XSD_Validation/: CLI, Python, Java (verified here), .NET, PowerShell
(reference). All target the official released schema via tools/fetch-schema.sh.

Schematron: tools/fetch-tools.sh fetches Saxon + self-contained SchXslt CLI.
invocation/ runs basic_checks.sch via CLI + native Java (verified), Python
(saxonche) and .NET (reference); shared svrl-summary.py defines pass/fail.

Ruleset fix: the percentage-sum rule (and a Position rule) were dead code —
shadowed by an earlier same-context rule in the same pattern (ISO Schematron
first-match-per-pattern). Split into percentage-validations /
position-currency-validations / position-direction-validations so they fire.
Verified: 120%-sum -> ERROR; canonical sample -> 0 errors.

Canonical sample reconciled to truly pass all ERROR rules: Fund NAV set to
112,500,000 (actual position-value sum), percentages recomputed to sum to
100%, share classes given TotalAssetValues/SharesOutstanding consistent with
NavPrice. 12 advisory warnings remain (documented).

Negative fixtures: xsd-invalid (bad decimal) and schematron-invalid
(percentages sum to 120%). .lib/ gitignored.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
XSLT_DataQuality_Checks/Custom_Internal_Checks/: XSLT 2.0 house rules
(AssetType whitelist, ID convention, concentration limit, OTC LEI) -> HTML.
XSLT_Transformations/: factsheet_html.xslt, factsheet_fo.xslt (XSL-FO -> FOP
PDF), positions_csv.xslt (RFC-4180). invocation/ runs them via Saxon CLI and
native Java s9api (both verified) plus Python/Node references.

.github/workflows/ci.yml: fetches official schemas + Java toolchain, XSD-
validates all 7 samples, asserts both negative fixtures fail, runs Schematron
(canonical passes / fixture fails), smoke-tests all transforms, regression-
runs the legacy XSLT 1.0 report. All steps simulated green locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@karlkauc
karlkauc merged commit bcac34f into main May 15, 2026
2 checks passed
@karlkauc
karlkauc deleted the feature/enterprise-showcase-phase1 branch May 15, 2026 16:43
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