Skip to content

Commit

Permalink
MCR-2999 cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteph-de committed Nov 15, 2023
1 parent 1178aa4 commit f9253f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ public static void export(String id, String dirname, String style) throws Except
MCRCategory cl = DAO.getCategory(MCRCategoryID.rootID(id), -1);
Document classDoc = MCRCategoryTransformer.getMetaDataDocument(cl, false);

Transformer trans
= MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE);
Transformer trans = MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE);
String extension = MCRXSLTransformerUtils.getFileExtension(trans, "xml");

File xmlOutput = new File(dir, id + "." + extension);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ public static void exportWithStylesheet(String fromID, String toID, String dirna
return;
}

Transformer trans
= MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE);
Transformer trans = MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE);
String extension = MCRXSLTransformerUtils.getFileExtension(trans, "xml");

int k = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,7 @@ public static void exportWithTransformer(String id, String dirname, String trans
+ "The default for {3} is '{MCR.Layout.Transformer.Factory.XSLFolder}/save-object.xsl'.",
order = 100)
public static void exportWithStylesheet(String fromID, String toID, String dirname, String style) {
Transformer transformer
= MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE);
Transformer transformer = MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE);
String extension = MCRXSLTransformerUtils.getFileExtension(transformer, "xml");
exportWith(fromID, toID, dirname, extension, (content, out) -> {
StreamResult sr = new StreamResult(out);
Expand Down

0 comments on commit f9253f0

Please sign in to comment.