@@ -93,7 +93,7 @@ public class StyleSheetGenerator extends StyleReport {
9393 Velocity .init ();
9494
9595 String [] _path_comp = {"org" , "apache" , "velocity" , "tools" , "generic" , "tools.xml" };
96- StringBuilder sb_path = new StringBuilder ();
96+ StringBuilder sb_path = new StringBuilder ("" );
9797 boolean is_first = true ;
9898 for (String s : _path_comp ) {
9999 if (!is_first ) {
@@ -105,7 +105,7 @@ public class StyleSheetGenerator extends StyleReport {
105105 }
106106 FactoryConfiguration f ;
107107 f = ConfigurationUtils .findInClasspath (sb_path .toString ());
108- velocityToolManager = new ToolManager (false , false );
108+ velocityToolManager = new ToolManager (false , true );
109109 velocityToolManager .configure (f );
110110 } catch (Exception e ) {
111111 System .err .println ("Failed to initialize Velocity. " +
@@ -119,6 +119,7 @@ public StyleSheetGenerator(String title, StyleSheet style, String document,
119119 }
120120
121121 public StyleSheetGenerator (ApplContext ac , String title , StyleSheet style ,
122+
122123 String document , int warningLevel ) {
123124 ArrayList <CssRuleList > items ;
124125
@@ -214,13 +215,8 @@ public StyleSheetGenerator(ApplContext ac, String title, StyleSheet style,
214215 produceStyleSheet ();
215216
216217 try {
217- String [] _template_dir = {"org" , "w3c" , "css" , "css" };
218- StringBuilder sb_template_file = new StringBuilder ();
219- for (String s : _template_dir ) {
220- sb_template_file .append (s ).append (FileSystems .getDefault ().getSeparator ());
221- }
222- sb_template_file .append (template_file );
223- template = Velocity .getTemplate (sb_template_file .toString ());
218+ String _template_dir = "org/w3c/css/css/" ;
219+ template = Velocity .getTemplate (_template_dir + template_file );
224220 template .setEncoding ("utf-8" );
225221 } catch (ResourceNotFoundException rnfe ) {
226222 System .err .println (rnfe .getMessage ());
0 commit comments