fix: small code defects from the full example review + documentation sweep - #25
Merged
Conversation
…ion sweep Code - XML_Signature/java/VerifyFundsXml: a KeyInfo without X509Data/KeyValue (e.g. the committed skeleton with only ds:KeyName) crashed Santuario with "Didn't get a key" and a stack trace; now reports INVALID and exits 1 as documented. - Database_Integration/java/ExportFundsXml: the document lookup concatenated the CLI id into SQL - the only unbound query in the repo; use a PreparedStatement like every other query. - XSLT_DataQuality_Checks/Custom_Internal_Checks: concentrationLimitPct was declared as xs:decimal, so the README's "concentrationLimitPct=5" example failed with a type error (runners pass strings); param is untyped now and cast where used. R3 fails as intended with the tighter limit. - Data_Binding_JSON/python/fundsxml_json.py printed "None" as usage (header is a comment block, not a docstring); print an explicit usage line. - Data_Binding_JSON/java/NativeBinding: bind consistently to Fund[1] and say it is a single-fund binding (previously fund-1 metadata was mixed with all-fund positions on multi-fund input). - pyproject.toml: optional extra "signature" (signxml) for the Python signature example. Documentation (all stale references found by the review) - .csproj comments no longer show broken "dotnet run project ..." commands (XML comments cannot contain a double dash); they point at the .cs headers. XSD_Validation csproj also dropped the deleted SchemaResolver.cs / version argument. - Schematron Basic_Checks README: Quick Start now leads with the ./mvnw runner, dead ../README.md links point at invocation/README.md, sample paths include positions/; invocation pom.xml example uses a repo-root path; .NET row states that the Saxon .NET NuGet packages are dotnet tools (NU1212) so the reference variant does not restore as-is. - XSLT_DataQuality_Checks README lists Custom_Internal_Checks and the ./mvnw / saxonche runners; Basic README "6 main validation areas". - XML_Signature: .NET marked verified (sign/verify/tamper, cross-verifies with Java both ways); xmlsec1/skeleton profile difference (inclusive C14N, KeyName only) documented; Python header no longer refers to a future build-system migration; .gitignore names GenerateTestKey.java. - FundsXML_Files: 12 asset types (not 13), Multi-Fund fixture listed, "Phase 3" placeholders replaced by links to XML_Signature/, Saxon XSD validation marked EE-only, EFT expanded as European Feedback Template (per the XSD annotation), README snippet/table for ID_001 uses the file's 8.33 %. - Data_Binding_JSON README documents the real JSON shape (funds[] / portfolios[] / positions[]). - Database_Integration: package.json scripts point at the split import/export programs (fundsxml_db.mjs no longer exists), export header uses python for xml_equiv.py, README Verified column consistent with CI, venv note for the python3 commands. - Large_File_Processing README states the measured constant-memory figures (16 MiB RSS at 30k and 200k positions, Java under -Xmx16m). - XQuery top-holdings.xq comment uses the bare n=5 form. Verified: ./mvnw -q -B compile green; skeleton verify -> INVALID exit 1, signed file -> VALID exit 0; Java DB import/export still EQUIVALENT and XSD-valid, injection-shaped id rejected; custom DQ default 4x PASS, limit 5 -> 1 FAIL; fundsxml_json usage exit 2, Multi-Fund roundtrip EQUIVALENT; NativeBinding 21 positions (Mixed), 4 (first fund of Multi-Fund); pip install -e ".[signature]" installs signxml; all edited XML files well-formed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YXZWhwE5EbHSybt55K6oUZ
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YXZWhwE5EbHSybt55K6oUZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Third PR from the full verification pass over every example (after #23 Schematron, #24 CSV/TPT). Small code defects plus every stale documentation reference the review turned up.
Code
XML_Signature/java/VerifyFundsXml— KeyInfo without X509Data/KeyValue (the committed skeleton) crashed withDidn't get a key+ stack trace; nowINVALID, exit 1 as documented.Database_Integration/java/ExportFundsXml— document lookup concatenated the CLI id into SQL (only unbound query in the repo) →PreparedStatement.Custom_Internal_Checks/custom_internal_checks.xslt—concentrationLimitPcttypedxs:decimalbroke the README'sconcentrationLimitPct=5example (runners pass strings); untyped + cast. R3 now fails with the tighter limit.Data_Binding_JSON/python/fundsxml_json.py— usage printedNone; explicit usage line.Data_Binding_JSON/java/NativeBinding— consistentlyFund[1]and documented as single-fund binding.pyproject.toml— optional extrasignature(signxml).Docs
.csprojcomments: no more brokendotnet run project …commands (XML comments can't contain--); XSD one also dropped the deletedSchemaResolver.cs/ version arg../mvnwrunner first, dead../README.mdlinks fixed,positions/in sample paths, invocationpom.xmluses repo-root path, .NET row states the NuGet packages are dotnet tools (NU1212).Custom_Internal_Checkslisted,./mvnw/saxoncherunners; "6 main validation areas"..gitignorecomment fixed.package.jsonscripts, export header, Verified column, venv note. Large_File README: measured memory figures.top-holdings.xqcomment.Deliberately not in this PR (to avoid conflicts with #23): the Schematron README rule tables that still describe 7 patterns — follow-up after #23 merges.
Verification (local)
./mvnw -q -B compilegreen · skeleton verify →INVALIDexit 1, signed →VALIDexit 0 · Java DB import/exportEQUIVALENT+ XSD-valid, injection-shaped id rejected · custom DQ default 4× PASS,limit=5→ 1 FAIL ·fundsxml_json.pyusage exit 2, Multi-Fund roundtripEQUIVALENT· NativeBinding 21 (Mixed) / 4 (Multi first fund) ·pip install -e ".[signature]"OK · all edited XML well-formed.🤖 Generated with Claude Code
https://claude.ai/code/session_01YXZWhwE5EbHSybt55K6oUZ