Skip to content

Replace JAXB/orchestra-repository with XSLT 2.0 + Saxon-HE - #88

Draft
chrjohn with Copilot wants to merge 8 commits into
masterfrom
copilot/create-xslt-stylesheets
Draft

chrjohn with Copilot wants to merge 8 commits into
masterfrom
copilot/create-xslt-stylesheets

Conversation

Copilot AI commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Eliminates io.fixprotocol.orchestra:repository and all JAXB code from the generator module. XML parsing and tree-walking are replaced by four XSLT 2.0 stylesheets driven by Saxon-HE via javax.xml.transform.TransformerFactory. CLI and Maven plugin interfaces are unchanged.

Core change

OrchestraTransformer — the only new Java class:

// Uses Saxon directly; inner MkDirOutputURIResolver auto-creates dirs for xsl:result-document
TransformerFactory factory = TransformerFactory.newInstance(
    "net.sf.saxon.TransformerFactoryImpl", null);
factory.setAttribute("http://saxon.sf.net/feature/outputURIResolver",
    new MkDirOutputURIResolver());

CodeGeneratorJ and DataDictionaryGenerator become thin adapters that forward to OrchestraTransformer.transform(inputFile, stylesheet, outputDir, params).

Stylesheets (src/main/resources/xslt/)

File Replaces
common.xsl Shared keys (fieldById, groupById, …) and type-mapping functions
code-generator-fields.xsl Field .java generation loop in CodeGeneratorJ
code-generator-messages.xsl Message / component / group / factory / cracker generation
data-dictionary.xsl DataDictionaryGenerator tree-walk; emits QuickFIX XML via xsl:result-document

Dependency changes

Removed: io.fixprotocol.orchestra:repository, jakarta.xml.bind-api, jaxb-impl
Added: net.sf.saxon:Saxon-HE:11.6 (compile scope — OutputURIResolver API is used directly)

Test surface

CodeGeneratorUtilTest and DataDictionaryGeneratorTest had methods that instantiated JAXB FieldType / Repository objects directly; those are replaced with equivalent tests against the new API. All other tests (OrchestraGoldenFileTest byte-for-byte golden comparison, CodeGeneratorJSessionExclusionTest, plugin mojos) required no logic changes.

Copilot AI and others added 3 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>
Copilot AI changed the title Replace JAXB with XSLT/Saxon for Orchestra code and dictionary generation Replace JAXB/orchestra-repository with XSLT 2.0 + Saxon-HE Aug 9, 2026
Copilot AI requested a review from chrjohn August 9, 2026 18:10
…-stylesheets

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

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

chrjohn commented Sep 20, 2026

Copy link
Copy Markdown
Member

@copilot
Please integrate underscore logic from pr 95 file
home/runner/work/quickfixj-orchestra/quickfixj-orchestra/quickfixj-from-fix-orchestra-repository/quickfixj-from-fix-orchestra-generator/src/main/resources/xslt/common.xsl
In this pr

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