Skip to content
Snippets Groups Projects
Commit a9d0f330 authored by Thorsten Vitt's avatar Thorsten Vitt
Browse files

Fix: xsl-stylesheet didn't have any practical effect.

TODO associated stylesheet is detected as a side effect of fetching the
source. Need to make sure this has been done when we call
getTransformer(). We also need a test here.
parent 7096aaca
No related branches found
No related tags found
No related merge requests found
......@@ -176,6 +176,7 @@ void detectEmbeddedStylesheet(final Source source) {
.getAssociatedStylesheet(source, null, null, null);
this.associatedStylesheetURI = Optional.of(new URI(
associatedStylesheet.getSystemId()));
logger.log(Level.INFO, "Detected associated stylesheet {0}, URI {1}", new Object[] { associatedStylesheet, associatedStylesheetURI.get()});
} catch (final TransformerConfigurationException e) {
logger.log(Level.WARNING, "Failed to load stylesheet from <?xsl-stylesheet?> declaration", e);
......@@ -304,7 +305,8 @@ public ResponseBuilder createResponse() throws ObjectNotFoundFault, MetadataPars
if (isNotModified())
return getResponseBuilder();
getTransformer().setSource(getSource());
final Source source = getSource();
getTransformer().setSource(source);
if (requestedMediaType.isPresent()) {
setMediaType(requestedMediaType.get());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment