Skip to content

Commit

Permalink
harvester: fix xsl transfo process
Browse files Browse the repository at this point in the history
  • Loading branch information
fgravin committed Mar 13, 2017
1 parent 91dd24b commit 31d8c14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Expand Up @@ -8,6 +8,7 @@

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;

Expand Down Expand Up @@ -63,7 +64,14 @@ public static Element processMetadata(MetadataSchema metadataSchema,
Map<String, Object> processParams,
Logger log) {

Path filePath = metadataSchema.getSchemaDir().resolve("process").resolve(processName + ".xsl");
Path filePath = null;
//GEOCAT in harvester xsl comes from xsl/convert
if(processName.startsWith("/")) {
filePath = Paths.get(processName);
}
else {
filePath = metadataSchema.getSchemaDir().resolve("process").resolve(processName + ".xsl");
}
if (!Files.exists(filePath)) {
log.info(" processing instruction not found for " + metadataSchema.getName() + " schema. metadata not filtered.");
} else {
Expand Down
Expand Up @@ -66,7 +66,7 @@
</div>
<div>
<label class="control-label" data-translate="">applyXSLToRecord</label>
<div data-gn-import-xsl="harvesterSelected.content.importxslt"/>
<div data-gn-import-xsl="harvesterSelected.site.xslfilter"/>

<p class="help-block" data-translate="">applyXSLToRecordHelp</p>
</div>
Expand Down

0 comments on commit 31d8c14

Please sign in to comment.