Skip to content

Conversation

@fluetze
Copy link
Member

@fluetze fluetze commented Sep 15, 2025

Link to jira: MCR-3497.

New Package org.mycore.frontend.xeditor.transform contanis all classes involved in this transformation.

Before:
xeditor.xsl makes many calls to MCRIncludeHandler and MCRXEditorTransformer classes via Xalan Java extensions.
After:
xeditor.xsl calls the new MCRTransformerHelperResolver via document() function.

MCRTransformerHelperCall parses the URI of the document() call.
MCRTransformerHelperBase is the common abstract base class of all classes implementing a single xml element transformation.
For example, xed:bind is transformed with the help of MCRBindTransformerHelper.

The xsl's have been migrated to XSLT 3, and the XEditor transformer is now Saxon.
Xalan support is removed.

For applications defining custom xml templates (e.g. MIR), there is and was a hook to plug-in the XSL stylesheets to preprocess them from custom xml templates to xed+xhtml templates, which are then processed by xeditor.xsl. This had to be changed too:

Before:
XEditorTransformer processed these both via Xalan:
MCR.ContentTransformer.xeditor.Stylesheet=xsl/xeditor-templates.xsl,xsl/xeditor.xsl

After:
To minimize migration, XEditorTransformer uses two steps now, one via Xalan and one via Saxon.
Applicatons that have converted their XSLs to v3/Saxon, can change the properties.

CR.ContentTransformer.xeditor.Class=org.mycore.common.content.transformer.MCRTransformerPipe
MCR.ContentTransformer.xeditor.Steps=transform-xeditor-templates,transform-xeditor

MCR.ContentTransformer.transform-xeditor.Class=org.mycore.common.content.transformer.MCRXSL2XMLTransformer
MCR.ContentTransformer.transform-xeditor.TransformerFactoryClass=%SAXON%
MCR.ContentTransformer.transform-xeditor.Stylesheet=xslt/xeditor.xsl

MCR.ContentTransformer.transform-xeditor-templates.Class=org.mycore.common.content.transformer.MCRXSL2XMLTransformer
MCR.ContentTransformer.transform-xeditor-templates.TransformerFactoryClass=%XALAN%
MCR.ContentTransformer.transform-xeditor-templates.Stylesheet=xsl/xeditor-templates.xsl

@fluetze fluetze requested a review from yagee-de September 16, 2025 05:44
@fluetze
Copy link
Member Author

fluetze commented Sep 19, 2025

Testing requires minor changes in the application:
For MIR, this is done in MIR-1489.

@yagee-de yagee-de merged commit 1cc1149 into main Dec 16, 2025
2 of 5 checks passed
@yagee-de yagee-de deleted the issues/MCR-3497_Remove_Xalan_extensions_from_XEditor branch December 16, 2025 13:48
@fluetze fluetze restored the issues/MCR-3497_Remove_Xalan_extensions_from_XEditor branch December 16, 2025 20:46
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.

4 participants