Skip to content

Fix data dictionary golden-file mismatch caused by incomplete underscore rule in XSLT name conversion - #95

Draft
chrjohn with Copilot wants to merge 9 commits into
masterfrom
copilot/fix-failing-tests
Draft

Fix data dictionary golden-file mismatch caused by incomplete underscore rule in XSLT name conversion#95
chrjohn with Copilot wants to merge 9 commits into
masterfrom
copilot/fix-failing-tests

Conversation

Copilot AI commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

DataDictionaryGoldenFileTest failed with an assertion error at FIXLatest.xml line 10734, indicating the XSLT-based data dictionary generator (introduced to replace the JAXB implementation) no longer produced output matching the golden fixture.

Root cause

qfj:precedeCapsWithUnderscore in common.xsl — the XSLT equivalent of the original Java toConstantName — only inserted an underscore between a lowercase letter and a following uppercase letter. The Java version inserts an underscore before any uppercase letter not preceded by another uppercase letter, including when preceded by a digit. This divergence produced incorrect enum-value descriptions wherever a name had a digit immediately before an uppercase letter:

DV01PV01LIMIT   ->  should be DV01_PV01_LIMIT
US401K          ->  should be US401_K
CD91D           ->  should be CD91_D

Verified by comparing the new XSLT generator's output against the original JAXB generator on the current OrchestraFIXLatest.xml: aside from this bug, the two implementations produce byte-for-byte identical output, confirming the golden fixture — not the generator logic — needed to reflect the corrected behavior.

Changes

  • common.xsl: added a second regex pass to precedeCapsWithUnderscore for digit→uppercase transitions, matching the Java algorithm exactly.
  • golden/dictionary/FIXLatest.xml: regenerated from the corrected generator output.

Out of scope

quickfix.OrchestraGoldenFileTest (Java code golden test) still fails — its golden .java sources were never regenerated after OrchestraFIXLatest.xml was bumped to EP309. This is a separate, pre-existing fixture-staleness issue, unrelated to the XSLT naming bug fixed here.

Copilot AI and others added 9 commits August 9, 2026 17:57
Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
…tion

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
…arations

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
…-stylesheets

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
….xml

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
…efore uppercase

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
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.

2 participants