Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCR-2966 move saxon compatible stylesheets to folder xslt #1964

Merged
merged 29 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6aef2a6
MCR-2966 xslt folder
Sep 18, 2023
8647253
MCR-2966 xslt folder
Sep 20, 2023
847a36a
MCR-2966 xslt folder
Sep 20, 2023
216fbad
MCR-2966 xslt folder
Sep 21, 2023
4c42163
MCR-2966 xslt folder
Sep 21, 2023
ad1d02e
MCR-2966 xslt folder
Sep 26, 2023
28603e1
MCR-2966 xslt folder
Sep 26, 2023
0ff95fa
MCR-2966 xslt folder
Sep 28, 2023
3e5389a
MCR-2966 xslt folder
Sep 28, 2023
79f37ba
Merge remote-tracking branch 'origin/main' into issues/MCR-2966-xslt-…
Oct 4, 2023
85fdc2d
MCR-2966 xslt folder
Sep 18, 2023
27999f6
MCR-2966 xslt folder
Sep 20, 2023
c90f88b
MCR-2966 xslt folder
Sep 20, 2023
0473146
MCR-2966 xslt folder
Sep 21, 2023
9fc32c5
MCR-2966 xslt folder
Sep 21, 2023
1560f3e
MCR-2966 xslt folder
Sep 26, 2023
6c97723
MCR-2966 xslt folder
Sep 26, 2023
d579af3
MCR-2966 xslt folder
Sep 28, 2023
c05e7c4
MCR-2966 xslt folder
Sep 28, 2023
49ad890
Merge remote-tracking branch 'origin/issues/MCR-2966-xslt-folder' int…
Oct 9, 2023
ffe1dbf
Merge remote-tracking branch 'origin/main' into issues/MCR-2966-xslt-…
Oct 9, 2023
42b4bab
MCR-2966 xslt folder
Oct 9, 2023
d04ab82
Merge remote-tracking branch 'origin/main' into issues/MCR-2966-xslt-…
Oct 10, 2023
0ddd2cf
Merge remote-tracking branch 'origin/main' into issues/MCR-2966-xslt-…
Oct 10, 2023
9127faf
MCR-2966 xslt folder
Oct 13, 2023
e9b3e0e
Merge remote-tracking branch 'origin/main' into issues/MCR-2966-xslt-…
Oct 16, 2023
1eafc4a
Merge remote-tracking branch 'origin/main' into issues/MCR-2966-xslt-…
Oct 18, 2023
fb8c445
MCR-2966 xslt folder
Oct 18, 2023
12346d8
Merge remote-tracking branch 'origin/main' into issues/MCR-2966-xslt-…
Oct 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mycore-base/src/main/java/org/mycore/common/MCRMailer.java
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,8 @@ public static Element sendMail(Document input, String stylesheet) throws Excepti
private static Document transform(Document input, String stylesheet, Map<String, String> parameters)
throws Exception {
MCRJDOMContent source = new MCRJDOMContent(input);
MCRXSL2XMLTransformer transformer = MCRXSL2XMLTransformer.getInstance("xsl/" + stylesheet + ".xsl");
final String xslFolder = MCRConfiguration2.getStringOrThrow("MCR.Layout.Transformer.Factory.XSLFolder");
MCRXSL2XMLTransformer transformer = MCRXSL2XMLTransformer.getInstance(xslFolder + "/" + stylesheet + ".xsl");
MCRParameterCollector parameterCollector = MCRParameterCollector.getInstanceFromUserSession();
parameterCollector.setParameters(parameters);
MCRContent result = transformer.transform(source, parameterCollector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ private String getResourceName(String id) {
* Builds the filename of the stylesheet to use, e. g. "playlist-simple.xsl"
*/
private String buildStylesheetName(String id) {
return String.format(Locale.ROOT, "xsl/%s.xsl", id.replaceAll("-default$", ""));
final String xslFolder = MCRConfiguration2.getStringOrThrow("MCR.Layout.Transformer.Factory.XSLFolder");
return String.format(Locale.ROOT, "%s/%s.xsl", xslFolder, id.replaceAll("-default$", ""));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import javax.xml.transform.stream.StreamSource;
import javax.xml.xpath.XPathExpressionException;

import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.cache.HttpCacheContext;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
Expand Down Expand Up @@ -233,6 +234,7 @@ private HashMap<String, URIResolver> getResolverMapping() {
supportedSchemes.put("catchEx", new MCRExceptionAsXMLResolver());
supportedSchemes.put("notnull", new MCRNotNullResolver());
supportedSchemes.put("xslStyle", new MCRXslStyleResolver());
supportedSchemes.put("xslStyleXEditor", new MCRXslStyleXEditorResolver());
supportedSchemes.put("xslTransform", new MCRLayoutTransformerResolver());
supportedSchemes.put("xslInclude", new MCRXslIncludeResolver());
supportedSchemes.put("xslImport", new MCRXslImportResolver());
Expand Down Expand Up @@ -266,7 +268,8 @@ private HashMap<String, URIResolver> getResolverMapping() {
static String getParentDirectoryResourceURI(String base) {
if (base == null) {
// the file was not included from another file, so we need to use the default resource directory
return "resource:xsl/";
final String xslFolder = MCRConfiguration2.getStringOrThrow("MCR.Layout.Transformer.Factory.XSLFolder");
return "resource:" + xslFolder + "/";
} else {
String resolvingBase = null;

Expand Down Expand Up @@ -370,7 +373,9 @@ private Source tryResolveXSL(String href, String base) throws TransformerExcepti
}

// new relative include did not work, now fall back to old behaviour and print a warning if it works
Source oldResolveMethodResult = SUPPORTED_SCHEMES.get("resource").resolve("resource:xsl/" + href, base);
final String xslFolder = MCRConfiguration2.getStringOrThrow("MCR.Layout.Transformer.Factory.XSLFolder");
Source oldResolveMethodResult = SUPPORTED_SCHEMES.get("resource")
.resolve("resource:" + xslFolder + "/" + href, base);
if (oldResolveMethodResult != null) {
LOGGER.warn("The Stylesheet {} has include {} which only works with an old absolute include " +
"mechanism. Please change the include to relative!", base, href);
Expand Down Expand Up @@ -1217,7 +1222,19 @@ public Source resolve(String href, String base) throws TransformerException {
}
}

private MCRXSLTransformer getTransformer(String... stylesheet) {
protected MCRXSLTransformer getTransformer(String... stylesheet) {
final String xslFolder = MCRConfiguration2.getStringOrThrow("MCR.Layout.Transformer.Factory.XSLFolder");
String[] stylesheets = new String[stylesheet.length];
for (int i = 0; i < stylesheets.length; i++) {
stylesheets[i] = xslFolder + "/" + stylesheet[i] + ".xsl";
}
return MCRXSLTransformer.getInstance(stylesheets);
}
}

private static class MCRXslStyleXEditorResolver extends MCRXslStyleResolver {
@Override
protected MCRXSLTransformer getTransformer(String... stylesheet) {
String[] stylesheets = new String[stylesheet.length];
for (int i = 0; i < stylesheets.length; i++) {
stylesheets[i] = "xsl/" + stylesheet[i] + ".xsl";
Expand Down Expand Up @@ -1329,10 +1346,12 @@ public Source resolve(String href, String base) {
.orElseGet(Collections::emptyList);
}

final String xslFolder = MCRConfiguration2.getStringOrThrow("MCR.Layout.Transformer.Factory.XSLFolder");
for (String include : propValue) {
// create a new include element
Element includeElement = new Element("include", xslNamespace);
includeElement.setAttribute("href", include.contains(":") ? include : "resource:xsl/" + include);
includeElement.setAttribute("href",
include.contains(":") ? include : "resource:" + xslFolder + "/" + include);
root.addContent(includeElement);
LOGGER.debug("Resolved XSL include: {}", include);
}
Expand All @@ -1357,7 +1376,30 @@ private static class MCRXslImportResolver implements URIResolver {

@Override
public Source resolve(String href, String base) throws TransformerException {
String importXSL = MCRXMLFunctions.nextImportStep(href.substring(href.indexOf(':') + 1));
final String baseURI = getParentDirectoryResourceURI(base);
// set xslt folder
final String xslFolder;
if (StringUtils.contains(baseURI, "/xsl/")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

baseURI.startswith would work more secure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this correctly, getParentDirectoryResourceURI always returns a string starting with resource (https://github.com/MyCoRe-Org/mycore/blob/2022.06.x/mycore-base/src/main/java/org/mycore/common/xml/MCRURIResolver.java#L293)
e.g.:
base: jar:file:/home/musiclpz/production/build/webapps/WEB-INF/lib/mycore-solr-2023.08-SNAPSHOT.jar!/xslt/solr/indexing/mycoreobject-dynamicfields.xsl
baseuri: resource:xslt/solr/indexing/

so startsWith resource:xsl/ should be feasible.

However, in some edge cases getParentDirectoryResourceURI returns the given base. In these cases, this would not work. But I am not totally aware if in these cases something else goes wrong. If we can ignore these edge cases, we can test on startsWith resource:xsl/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this correctly, getParentDirectoryResourceURI always returns a string starting with resource (https://github.com/MyCoRe-Org/mycore/blob/2022.06.x/mycore-base/src/main/java/org/mycore/common/xml/MCRURIResolver.java#L293)
e.g.:
base: jar:file:/home/musiclpz/production/build/webapps/WEB-INF/lib/mycore-solr-2023.08-SNAPSHOT.jar!/xslt/solr/indexing/mycoreobject-dynamicfields.xsl
baseuri: resource:xslt/solr/indexing/

Yes you are right.

However, in some edge cases getParentDirectoryResourceURI returns the given base. In these cases, this would not work. But I am not totally aware if in these cases something else goes wrong. If we can ignore these edge cases, we can test on startsWith resource:xsl/

I think in the edge cases the property should be used. So check for startsWith resource:xsl/ or resource:xslt/ and if both false than use the property.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to startsWith resource:xsl/ / resource:xslt/

I had to rollback the changes in nextImportStep, since it produced errors when using the proposed new xslImport syntax (without selfname). This resulted in errors because xsl:import href="xslImport:xxx" was included more than once and ultimately failed with a stylesheet including itself. I was not able to fix this and, thus. would suggest to postpone the syntax change to a later point.

xslFolder = "xsl";
} else {
xslFolder = "xslt";
}

// check for old import format: xslImport:property:current.xsl and issue a warning
final String importXSL;
final String importPart = StringUtils.substringAfter(href, ":");
if (StringUtils.contains(importPart, ":")) {
final String propertyPart = StringUtils.substringBefore(importPart, ":");
LOGGER.warn("{} is in old import format change to xslImport:{}!", href, propertyPart);

importXSL = MCRXMLFunctions.nextImportStep(importPart);
} else {
final String selfName = StringUtils.substringAfter(baseURI, xslFolder + "/")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe more secure to use baseURI.substring(xslFolder.length+1)

+ StringUtils.substringAfterLast(base, "/");

importXSL = MCRXMLFunctions.nextImportStep(importPart, selfName);
}

if (importXSL.isEmpty()) {
LOGGER.debug("End of import queue: {}", href);
Namespace xslNamespace = Namespace.getNamespace("xsl", "http://www.w3.org/1999/XSL/Transform");
Expand All @@ -1366,7 +1408,8 @@ public Source resolve(String href, String base) throws TransformerException {
return new JDOMSource(root);
}
LOGGER.debug("xslImport importing {}", importXSL);
return fallback.resolve("resource:xsl/" + importXSL, base);

return fallback.resolve("resource:" + xslFolder + "/" + importXSL, base);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,21 @@ public static String nextImportStep(String includePart) {
selfName = includePart.substring(border + 1);
includePart = includePart.substring(0, border);
}
return nextImportStep(includePart, selfName);
}

/**
* Helper function for xslImport URI resolver and {@link #hasNextImportStep(String)}
*
* @param includePart substring after xslImport:
* @param selfName name of the current stylesheet
* @return the next stylesheet name to import
*/
public static String nextImportStep(String includePart, String selfName) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("get next import step for {}", includePart);
LOGGER.debug("get next import step for {}:{}", includePart, selfName);
}

// get the parameters from mycore.properties
List<String> importList = MCRConfiguration2.getString("MCR.URIResolver.xslImports." + includePart)
.map(MCRConfiguration2::splitValue)
Expand All @@ -766,6 +778,9 @@ public static String nextImportStep(String includePart) {
if (selfName == null && listIterator.hasPrevious()) {
return listIterator.previous();
}
if (!importList.contains(selfName) && listIterator.hasPrevious()) {
return listIterator.previous();
}

while (listIterator.hasPrevious()) {
String currentStylesheet = listIterator.previous();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.jdom2.filter.Filters;
import org.jdom2.util.IteratorIterable;
import org.mycore.common.MCRConstants;
import org.mycore.common.config.MCRConfiguration2;
import org.mycore.common.config.MCRConfigurationDir;
import org.mycore.common.content.MCRJDOMContent;
import org.mycore.common.xml.MCRURIResolver;
Expand All @@ -57,8 +58,8 @@

/**
* Lists all *.xsl stylesheets in the web application located in any
* WEB-INF/lib/*.jar or WEB-INF/classes/xsl/ or in {@link MCRConfigurationDir}, outputs the
* dependencies (import/include) and contained templates.
* WEB-INF/lib/*.jar or WEB-INF/classes/[MCR.Layout.Transformer.Factory.XSLFolder]/ or in {@link MCRConfigurationDir},
* outputs the dependencies (import/include) and contained templates.
*
* @author Frank Lützenkirchen
*/
Expand All @@ -69,6 +70,8 @@ public final class MCRXSLInfoServlet extends MCRServlet {
private final Map<String, Stylesheet> stylesheets = new HashMap<>();

private final Set<String> unknown = new HashSet<>();
private final String xslFolder =
MCRConfiguration2.getStringOrThrow("MCR.Layout.Transformer.Factory.XSLFolder") + "/";

protected void doGetPost(MCRServletJob job) throws Exception {
if ("true".equals(job.getRequest().getParameter("reload"))) {
Expand Down Expand Up @@ -202,7 +205,7 @@ private void findInJarInputStream(String pathOfJarFile, InputStream in) throws I

for (ZipEntry ze = zis.getNextEntry(); ze != null; ze = zis.getNextEntry()) {
String name = ze.getName();
if (name.startsWith("xsl/") && name.endsWith(".xsl")) {
if (name.startsWith(xslFolder) && name.endsWith(".xsl")) {
foundStylesheet(name, pathOfJarFile);
}
zis.closeEntry();
Expand All @@ -211,7 +214,7 @@ private void findInJarInputStream(String pathOfJarFile, InputStream in) throws I
}

private void findXSLinClassesDir() {
String base = "/WEB-INF/classes/xsl/";
String base = "/WEB-INF/classes/" + xslFolder;
for (String path : diveInto(base)) {
if (path.endsWith(".xsl")) {
foundStylesheet(path, base);
Expand All @@ -220,7 +223,7 @@ private void findXSLinClassesDir() {
}

private void foundStylesheet(String path, String source) {
String file = path.substring(path.lastIndexOf("xsl/") + 4);
String file = path.substring(path.lastIndexOf(xslFolder) + 4);
LOGGER.info("Found {} in {}", file, source);
Stylesheet stylesheet = getStylesheet(file);
if (source.startsWith("/WEB-INF/")) {
Expand Down Expand Up @@ -260,7 +263,7 @@ void inspect() {
}

private void resolveXSL() {
String uri = "resource:xsl/" + name;
String uri = "resource:" + xslFolder + name;
resolveXSL(uri);
if (xsl == null) {
resolveXSL(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.jdom2.Element;
import org.jdom2.transform.JDOMSource;
import org.mycore.common.MCRUsageException;
import org.mycore.common.config.MCRConfiguration2;
import org.mycore.common.xml.MCRURIResolver;
import org.mycore.datamodel.common.MCRXMLMetadataManager;
import org.mycore.datamodel.metadata.MCRMetadataManager;
Expand Down Expand Up @@ -167,7 +168,7 @@ public static Stream<String> getIdsFromIdToId(final String startId, final String
* the name of the style to be used when resolving the stylesheet.
* @param defaultStyle
* the name of the default style, ending with <em>.xsl</em> to be used when resolving the stylesheet.
* A corresponding file xsl/<em>defaultStyle</em> must exist.
* A corresponding file [MCR.Layout.Transformer.Factory.XSLFolder]/<em>defaultStyle</em> must exist.
* @param cache
* The transformer cache to be used.
* @return the transformer
Expand All @@ -185,7 +186,8 @@ public static Transformer getTransformer(String style, String defaultStyle, Map<
Element element = MCRURIResolver.instance().resolve("resource:" + xslFilePath);
if (element == null) {
LOGGER.warn("Couldn't find resource {} for style {}, using default.", xslFilePath, style);
xslFilePath = "xsl/" + defaultStyle;
final String xslFolder = MCRConfiguration2.getStringOrThrow("MCR.Layout.Transformer.Factory.XSLFolder");
xslFilePath = xslFolder + "/" + defaultStyle;
element = MCRURIResolver.instance().resolve("resource:" + xslFilePath);
}

Expand Down
4 changes: 3 additions & 1 deletion mycore-base/src/main/resources/config/mycore.properties
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ MCR.BatchEditor.BaseLevel.object=/mycoreobject
# Define the LayoutFactory class
MCR.Layout.Transformer.Factory=org.mycore.common.xml.MCRLayoutTransformerFactory

# Default folder for XSL files, switch to xsl for XSL1 applications
MCR.Layout.Transformer.Factory.XSLFolder=xslt

# The format of the session ID
# MCR.Session.Param=;jsessionid=

Expand Down Expand Up @@ -470,7 +473,6 @@ MCR.Startup.Class=org.mycore.backend.jpa.MCRJPABootstrapper,org.mycore.datamodel
MCR.Website.ReadAccessVerification=true

MCR.URIResolver.xslIncludes.MyCoReWebPage=classificationBrowser.xsl
MCR.URIResolver.xslIncludes.MyCoReWebPage-3=classificationBrowser-3.xsl
MCR.URIResolver.xslIncludes.functions=functions/acl.xsl,functions/classification.xsl,functions/derivate.xsl,functions/i18n.xsl,functions/mcrversion.xsl,functions/property.xsl,functions/stringutils.xsl,functions/url.xsl,functions/layoututils.xsl

##############################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
>
&html-output;

<xsl:include href="MyCoReLayout-3.xsl" />
<xsl:include href="xslInclude:MyCoReWebPage-3" />
<xsl:include href="MyCoReLayout.xsl" />
<xsl:include href="xslInclude:MyCoReWebPage" />
<!-- <xsl:include href="xslInclude:MyCoReWebPage" /> -->

<xsl:variable name="PageID" select="/MyCoReWebPage/@id" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package org.mycore.common.xml;

import org.apache.commons.lang3.StringUtils;
import org.junit.Assert;
import org.junit.Test;
import org.mycore.common.MCRTestCase;
import org.mycore.common.config.MCRConfiguration2;
import org.mycore.common.config.MCRConfigurationDir;

import javax.xml.transform.Source;
import java.util.LinkedHashMap;
import java.util.Map;

public class MCRURIResolverTest {
public class MCRURIResolverTest extends MCRTestCase {

@Test
public void testGetParentDirectoryResourceURI() {
Expand Down Expand Up @@ -36,4 +40,32 @@ public void testGetParentDirectoryResourceURI() {
Assert.assertEquals(entry.getValue(), result);
}
}

@Test
public void testImportFromSameDirectory() throws Exception {
MCRConfiguration2.set("MCR.URIResolver.xslImports.xsl-import", "functions/xsl-1.xsl,functions/xsl-2.xsl");

Source resolved = MCRURIResolver.instance()
.resolve("xslImport:xsl-import:functions/xsl-2.xsl", "file:/tmp/xsl/functions/xsl-2.xsl");
Assert.assertNotNull(resolved);
Assert.assertTrue(StringUtils.endsWith(resolved.getSystemId(), "/xsl/functions/xsl-1.xsl"));

resolved = MCRURIResolver.instance()
.resolve("xslImport:xsl-import:functions/xsl-2.xsl", "file:/tmp/xslt/functions/xsl-2.xsl");
Assert.assertNotNull(resolved);
Assert.assertTrue(StringUtils.endsWith(resolved.getSystemId(), "/xslt/functions/xsl-1.xsl"));

// check with new import layout
resolved = MCRURIResolver.instance()
.resolve("xslImport:xsl-import", "file:/tmp/xslt/functions/xsl-2.xsl");
Assert.assertNotNull(resolved);
Assert.assertTrue(StringUtils.endsWith(resolved.getSystemId(), "/xslt/functions/xsl-1.xsl"));

// check with new import layout for calling xsl
resolved = MCRURIResolver.instance()
.resolve("xslImport:xsl-import", "file:/tmp/xslt/functions/xsl-parent.xsl");
Assert.assertNotNull(resolved);
Assert.assertTrue(StringUtils.endsWith(resolved.getSystemId(), "/xslt/functions/xsl-2.xsl"));

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import org.junit.Test;
import org.mycore.common.MCRTestCase;
import org.mycore.common.config.MCRConfiguration2;

public class MCRXMLFunctionsTest extends MCRTestCase {

Expand Down Expand Up @@ -173,4 +174,20 @@ public void toNCNameSecondPart() {
}
}

@Test
public void testNextImportStep() {
MCRConfiguration2.set("MCR.URIResolver.xslImports.xsl-import", "functions/xsl-1.xsl,functions/xsl-2.xsl");

// test with old include part
String next = MCRXMLFunctions.nextImportStep("xsl-import:functions/xsl-2.xsl");
assertEquals("functions/xsl-1.xsl", next);

// test with new include part
next = MCRXMLFunctions.nextImportStep("xsl-import", "functions/xsl-2.xsl");
assertEquals("functions/xsl-1.xsl", next);

// test with new include part and self name not in list (i.e. using base template)
next = MCRXMLFunctions.nextImportStep("xsl-import", "xsl-parent.xsl");
assertEquals("functions/xsl-2.xsl", next);
}
}
5 changes: 5 additions & 0 deletions mycore-base/src/test/resources/xsl/functions/xsl-1.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- test XSL file for MCRURIResolverTest#testImportFromSameDirectory -->
<xsl:import href="xslImport:xsl-import:xsl-1.xsl"/>
</xsl:stylesheet>
5 changes: 5 additions & 0 deletions mycore-base/src/test/resources/xsl/functions/xsl-2.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- test XSL file for MCRURIResolverTest#testImportFromSameDirectory -->
<xsl:import href="xslImport:xsl-import:xsl-2.xsl"/>
</xsl:stylesheet>
5 changes: 5 additions & 0 deletions mycore-base/src/test/resources/xslt/functions/xsl-1.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- test XSL file for MCRURIResolverTest#testImportFromSameDirectory -->
<xsl:import href="xslImport:xsl-import:xsl-1.xsl"/>
</xsl:stylesheet>
5 changes: 5 additions & 0 deletions mycore-base/src/test/resources/xslt/functions/xsl-2.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- test XSL file for MCRURIResolverTest#testImportFromSameDirectory -->
<xsl:import href="xslImport:xsl-import:xsl-2.xsl"/>
</xsl:stylesheet>
Loading