Skip to content

fix(schematron): .NET variant drives the SchXslt CLI jar — builds, runs, in CI - #29

Merged
karlkauc merged 1 commit into
mainfrom
fix/dotnet-schematron-schxslt-cli
Aug 30, 2026
Merged

fix(schematron): .NET variant drives the SchXslt CLI jar — builds, runs, in CI#29
karlkauc merged 1 commit into
mainfrom
fix/dotnet-schematron-schxslt-cli

Conversation

@karlkauc

Copy link
Copy Markdown
Contributor

Summary

Last open item from the review: the .NET Schematron example never restored (SaxonHE12NetXslt is a dotnet tool, NU1212). Checked the alternatives: Saxonica ships .NET builds as tools only, SaxonCS is not on NuGet, and the third-party IKVM cross-compile (SaxonHE10Net31Api) builds but fails at runtime (missing Saxon.HE assembly).

  • SchematronValidate.cs now runs the self-contained SchXslt CLI jar as a child process (java from $JAVA_HOME/PATH; jar from $FUNDSXML_SCHXSLT_JAR or the Maven local repo, as before) and owns the result: SVRL parsing, classification by @role (failed-assert and successful-report), same 0/1/2 exit contract as Java and svrl-summary.py. No NuGet dependencies.
  • .csproj cleaned up; invocation/README.md row marked verified.
  • CI: new step runs the sample (exit 0) and the negative fixture (exit 1) through the .NET variant, after ./mvnw compile has populated the Maven repo with the jar.

Verification (local, .NET 8 + JDK 26)

run result
canonical sample 0 error(s), 12 warning(s), exit 0
negative fixture 1 error(s) (percentages 120 %), exit 1
--fail-on any on sample exit 1
$FUNDSXML_SCHXSLT_JAR=/nonexistent.jar SchXslt jar not found …, exit 2
missing document SchXslt CLI failed (exit 1): …, exit 2

🤖 Generated with Claude Code

https://claude.ai/code/session_01YXZWhwE5EbHSybt55K6oUZ

…ns, in CI

The .NET Schematron example referenced SaxonHE12NetXslt, which NuGet
publishes as a dotnet *tool*, so the project never restored (NU1212). There
is no Saxon-HE library package for .NET 8 at all: Saxonica ships its .NET
builds as tools only, SaxonCS is not on NuGet, and the third-party IKVM
cross-compiles (SaxonHE10Net31Api) fail at runtime with a missing Saxon.HE
assembly.

Replace the in-process Saxon pipeline with what a .NET service in a mixed
shop actually does: run the self-contained SchXslt CLI jar (bundles its own
Saxon) as a child process (java from $JAVA_HOME or PATH; jar from
$FUNDSXML_SCHXSLT_JAR or the Maven local repo, as before) and own the
result - SVRL parsing, error/warning classification by @ROLE (failed-assert
and successful-report alike) and the 0/1/2 exit-code contract shared with
the Java example and svrl-summary.py. No NuGet dependencies remain.

Verified (.NET SDK 8, JDK 26): canonical sample 0 errors / 12 warnings exit
0; negative fixture 1 error exit 1; --fail-on any exit 1; missing jar and
missing document exit 2 with a one-line message. CI runs the sample and the
fixture through it after the Java module has populated the Maven repo.
invocation/README.md row marked verified.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YXZWhwE5EbHSybt55K6oUZ
@karlkauc
karlkauc merged commit 29d4340 into main Aug 30, 2026
4 checks passed
@karlkauc
karlkauc deleted the fix/dotnet-schematron-schxslt-cli branch August 30, 2026 14:15
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