Skip to content

Commit

Permalink
MCR-2966 move Saxon ready stylesheets to /xslt
Browse files Browse the repository at this point in the history
  • Loading branch information
yagee-de committed Oct 30, 2023
1 parent d8fc8e5 commit af66d94
Show file tree
Hide file tree
Showing 14 changed files with 561 additions and 535 deletions.
50 changes: 38 additions & 12 deletions mir-module/src/main/resources/config/mir/mycore.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,35 @@ MIR.User.ShowSimpleDetailsOnly=false
# Important overwrites of MyCoRe defaults #
##############################################################################

##############################################################################
# No XSLT3 by default: Xalan-Compatibility MCR-2966 #
##############################################################################
# until we are ready to switch to Saxon by default:
MCR.LayoutService.TransformerFactoryClass=org.apache.xalan.processor.TransformerFactoryImpl

MCR.Layout.Transformer.Factory.XSLFolder=xsl

#required for mycore-solr
MCR.URIResolver.xslImports.solr-document=solr-basetemplate.xsl
MCR.URIResolver.xslImports.solr-document=%MCR.URIResolver.xslImports.solr-document%,mycoreobject-dynamicfields.xsl
MCR.URIResolver.xslIncludes.components=%MCR.URIResolver.xslIncludes.components%,solr-layout-utils.xsl
MCR.ContentTransformer.response.TransformerFactoryClass=org.apache.xalan.processor.TransformerFactoryImpl
MCR.ContentTransformer.response.Stylesheet=%MCR.ContentTransformer.response-prepared.Stylesheet%,xsl/response.xsl
MCR.ContentTransformer.response-browse.Stylesheet=xsl/response-browse.xsl
MCR.ContentTransformer.mycoreobject-solrdocument.Class=org.mycore.common.content.transformer.MCRXSL2JAXBTransformer
MCR.ContentTransformer.mycoreobject-solrdocument.TransformerFactoryClass=org.apache.xalan.processor.TransformerFactoryImpl
MCR.ContentTransformer.mycoreobject-solrdocument.Stylesheet=xsl/mycoreobject-solrdocument.xsl
MCR.ContentTransformer.mycoreobject-solrdocument.Context=org.mycore.solr.index.document.jaxb
MCR.ContentTransformer.response-solrdocument.Class=org.mycore.common.content.transformer.MCRXSL2JAXBTransformer
MCR.ContentTransformer.response-solrdocument.TransformerFactoryClass=org.apache.xalan.processor.TransformerFactoryImpl
MCR.ContentTransformer.response-solrdocument.Stylesheet=xsl/response2batch.xsl,%MCR.ContentTransformer.mycoreobject-solrdocument.Stylesheet%
MCR.ContentTransformer.response-solrdocument.Context=%MCR.ContentTransformer.mycoreobject-solrdocument.Context%
MCR.ContentTransformer.response-prepared.Class=org.mycore.common.content.transformer.MCRXSLTransformer
MCR.ContentTransformer.response-prepared.TransformerFactoryClass=org.apache.xalan.processor.TransformerFactoryImpl
MCR.ContentTransformer.response-prepared.Stylesheet=xsl/response-join-results.xsl,xsl/response-addDocId.xsl,xsl/response-addDerivates.xsl
MCR.URIResolver.xslIncludes.xeditorTemplates=solr-xeditor-templates.xsl

#required for mycore-mods
MCR.URIResolver.xslImports.solr-document=%MCR.URIResolver.xslImports.solr-document%,mods-solr.xsl

##############################################################################
# Configure ACL Checking #
Expand All @@ -51,7 +77,7 @@ MCR.ACL.AccessKey.Strategy.AllowedSessionPermissionTypes=
##############################################################################

MCR.ContentTransformer.rules-helper.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl
MCR.ContentTransformer.rules-helper.Stylesheet=xsl/rules-helper.xsl
MCR.ContentTransformer.rules-helper.Stylesheet=xslt/rules-helper.xsl

#MCR.Access.Strategy.Class=org.mycore.access.facts.MCRFactsAccessSystem
#MCR.Access.Class=org.mycore.access.facts.MCRFactsAccessSystem
Expand Down Expand Up @@ -254,7 +280,7 @@ MCR.ContentTransformer.response-mycoreobject.Stylesheet=xsl/response2mycoreobjec
MCR.ContentTransformer.response-browse.Class=org.mycore.common.content.transformer.MCRTransformerPipe
MCR.ContentTransformer.response-browse.Steps=response-mycoreobject,mycoreobject
MCR.ContentTransformer.mods2xeditor.Stylesheet=xsl/editor/mods2xeditor.xsl
MCR.ContentTransformer.mods2marcxml.Stylesheet=xsl/mods2marcxml.xsl,xsl/marc-tidy.xsl
MCR.ContentTransformer.mods2marcxml.Stylesheet=xslt/mods2marcxml.xsl,xslt/marc-tidy.xsl
MCR.ContentTransformer.mods2marcxml.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl
MCR.ContentTransformer.marcxml.Class=org.mycore.common.content.transformer.MCRTransformerPipe
MCR.ContentTransformer.marcxml.Steps=mods,mods2marcxml
Expand All @@ -264,9 +290,9 @@ MCR.ContentTransformer.oai-mods.Stylesheet=xsl/mods2mods.xsl
MCR.ContentTransformer.oai-epicur.Stylesheet=xsl/mods2epicur.xsl
MCR.ContentTransformer.oai-xMetaDissPlus.Stylesheet=xsl/mods2xMetaDissPlus.xsl
MCR.ContentTransformer.oai-oai_dc.Stylesheet=xsl/mods2oai_dc.xsl
MCR.ContentTransformer.datacite.Stylesheet=xsl/mycoreobject-datacite-mir.xsl
MCR.ContentTransformer.datacite.Stylesheet=xslt/mycoreobject-datacite-mir.xsl
MCR.ContentTransformer.datacite.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl
MCR.ContentTransformer.oai-oai_datacite.Stylesheet=xsl/mods2datacite.xsl
MCR.ContentTransformer.oai-oai_datacite.Stylesheet=xslt/mods2datacite.xsl
MCR.ContentTransformer.oai-oai_datacite.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl
MCR.URIResolver.xslIncludes.datacite=mycoreobject-datacite-mir.xsl

Expand All @@ -276,7 +302,7 @@ MCR.ContentTransformer.response-resultlist.Stylesheet=%MCR.ContentTransformer.re
MCR.Viewer.metadata.transformer = mycoreobject-viewer
MCR.ContentTransformer.mycoreobject-viewer.Stylesheet=xsl/mycoreobject-mods.xsl,xsl/mods-pure-viewer.xsl

MCR.ContentTransformer.pica2mods.Stylesheet=xsl/pica2mods.xsl
MCR.ContentTransformer.pica2mods.Stylesheet=xslt/pica2mods.xsl
MCR.ContentTransformer.pica2mods.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl

# Configure stylesheets used by content transformers
Expand All @@ -289,7 +315,7 @@ MIR.xMetaDissPlus.person.termsOfAddress2academicTitle=false
##############################################################################
# Support for Podcasts #
##############################################################################
MCR.ContentTransformer.mycoreobject-podcast.Stylesheet=xsl/mycoreobject-podcast.xsl
MCR.ContentTransformer.mycoreobject-podcast.Stylesheet=xslt/mycoreobject-podcast.xsl
MCR.ContentTransformer.mycoreobject-podcast.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl
# Apple requires an image of 3000x3000
MCR.IIIFImage.thumbnail.MaxImageBytes=27000000
Expand Down Expand Up @@ -480,7 +506,7 @@ MCR.GoogleSitemap.SolrQuery=worldReadable:true AND ((objectType:mods AND -state:
# MCR.Sword.DefaultOJS.State = imported

# MCR.ContentTransformer.ojsmets2mods.Class=org.mycore.common.content.transformer.MCRXSLTransformer
# MCR.ContentTransformer.ojsmets2mods.Stylesheet=xsl/sword/ojsmets2mods.xsl
# MCR.ContentTransformer.ojsmets2mods.Stylesheet=xslt/sword/ojsmets2mods.xsl
# MCR.ContentTransformer.ojsmets2mods.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl

# Goobi
Expand All @@ -499,7 +525,7 @@ MCR.GoogleSitemap.SolrQuery=worldReadable:true AND ((objectType:mods AND -state:

# MCR.ContentTransformer.deepgreenjats2mods.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl
# MCR.ContentTransformer.deepgreenjats2mods.Class=org.mycore.common.content.transformer.MCRXSLTransformer
# MCR.ContentTransformer.deepgreenjats2mods.Stylesheet=xsl/sword/jats2mods.xsl
# MCR.ContentTransformer.deepgreenjats2mods.Stylesheet=xslt/sword/jats2mods.xsl

# When set to "embed", related host publication (journal) will be embedded.
# When set to "link", related host publication (journal) will be created and/or linked via @xlink:href.
Expand All @@ -515,7 +541,7 @@ MCR.GoogleSitemap.SolrQuery=worldReadable:true AND ((objectType:mods AND -state:
# MCR.ContentTransformer.dissemin2mods.Stylesheet=xsl/sword/dissemin-mods2mycore-mods.xsl

# MCR.ContentTransformer.mycoreobject2dissemin-status.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl
# MCR.ContentTransformer.mycoreobject2dissemin-status.Stylesheet=xsl/sword/mycoreobject2dissemin-status.xsl
# MCR.ContentTransformer.mycoreobject2dissemin-status.Stylesheet=xslt/sword/mycoreobject2dissemin-status.xsl


##############################################################################
Expand Down Expand Up @@ -643,7 +669,7 @@ MIR.OADOI.Mail.Address=%MCR.mir-module.MailSender%
MCR.MODS.EnrichmentResolver.DataSource.OADOI.IdentifierTypes=doi
MCR.MODS.EnrichmentResolver.DataSource.OADOI.doi.URI=xslStyle:import/simplify-json-xml,import/oadoi2mods:xslTransform:json2xml:https://api.oadoi.org/v2/{1}?email=%MIR.OADOI.Mail.Address%
MCR.ContentTransformer.dummy-json2xml.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl
MCR.ContentTransformer.dummy-json2xml.Stylesheet=xsl/convertjson.xsl
MCR.ContentTransformer.dummy-json2xml.Stylesheet=xslt/convertjson.xsl
MCR.ContentTransformer.json2xml.Class=org.mycore.mir.importer.JSON2XMLTransformer

# Embargo auto release
Expand Down Expand Up @@ -707,7 +733,7 @@ MIR.Workflow.Box=false
# new Metadata Layout #
##############################################################################
MCR.ContentTransformer.DefaultStep.Stylesheet=%MCR.LayoutTransformerFactory.Default.Stylesheets%
MCR.ContentTransformer.newMetadataStylesheet.Stylesheet=xsl/metadata/mods-metadata-page.xsl
MCR.ContentTransformer.newMetadataStylesheet.Stylesheet=xslt/metadata/mods-metadata-page.xsl
MCR.ContentTransformer.newMetadataStylesheet.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl
MCR.ContentTransformer.mycoreobject.Class=org.mycore.common.content.transformer.MCRTransformerPipe
MCR.ContentTransformer.mycoreobject.Steps=mycoreobject-modsmeta,newMetadataStylesheet,DefaultStep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
exclude-result-prefixes="mcri18n mcrproperty"
version="3.0">

<xsl:include href="functions/i18n.xsl" />
<xsl:include href="functions/property.xsl" />
<xsl:include href="resource:xslt/functions/i18n.xsl" />
<xsl:include href="resource:xslt/functions/property.xsl" />

<xsl:param name="MIR.Layout.Top"/>
<xsl:param name="MIR.Layout.End"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>
Loading

0 comments on commit af66d94

Please sign in to comment.