@@ -93,7 +93,7 @@ public class StyleSheetGenerator extends StyleReport {
93
93
Velocity .init ();
94
94
95
95
String [] _path_comp = {"org" , "apache" , "velocity" , "tools" , "generic" , "tools.xml" };
96
- StringBuilder sb_path = new StringBuilder ();
96
+ StringBuilder sb_path = new StringBuilder ("" );
97
97
boolean is_first = true ;
98
98
for (String s : _path_comp ) {
99
99
if (!is_first ) {
@@ -105,7 +105,7 @@ public class StyleSheetGenerator extends StyleReport {
105
105
}
106
106
FactoryConfiguration f ;
107
107
f = ConfigurationUtils .findInClasspath (sb_path .toString ());
108
- velocityToolManager = new ToolManager (false , false );
108
+ velocityToolManager = new ToolManager (false , true );
109
109
velocityToolManager .configure (f );
110
110
} catch (Exception e ) {
111
111
System .err .println ("Failed to initialize Velocity. " +
@@ -119,6 +119,7 @@ public StyleSheetGenerator(String title, StyleSheet style, String document,
119
119
}
120
120
121
121
public StyleSheetGenerator (ApplContext ac , String title , StyleSheet style ,
122
+
122
123
String document , int warningLevel ) {
123
124
ArrayList <CssRuleList > items ;
124
125
@@ -214,13 +215,8 @@ public StyleSheetGenerator(ApplContext ac, String title, StyleSheet style,
214
215
produceStyleSheet ();
215
216
216
217
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 );
224
220
template .setEncoding ("utf-8" );
225
221
} catch (ResourceNotFoundException rnfe ) {
226
222
System .err .println (rnfe .getMessage ());
0 commit comments