- From: Mercurial notifier <nobody@w3.org>
- Date: Thu, 17 Jun 2010 11:21:40 -0400
- To: Unicorn Updates <www-validator-cvs@w3.org>
changeset: 1252:923fb86ec4be
user: Thomas Gambet <tgambet@w3.org>
date: Wed Jun 16 11:02:33 2010 -0400
files: src/org/w3c/unicorn/util/Templates.java
description:
removed compator library
diff -r 6c86a937db4c -r 923fb86ec4be src/org/w3c/unicorn/util/Templates.java
--- a/src/org/w3c/unicorn/util/Templates.java Wed Jun 16 10:35:53 2010 -0400
+++ b/src/org/w3c/unicorn/util/Templates.java Wed Jun 16 11:02:33 2010 -0400
@@ -1,6 +1,5 @@
package org.w3c.unicorn.util;
-import java.io.StringWriter;
import java.io.Writer;
import org.apache.velocity.VelocityContext;
@@ -8,20 +7,12 @@
import org.apache.velocity.exception.ParseErrorException;
import org.apache.velocity.exception.ResourceNotFoundException;
import org.w3c.unicorn.Framework;
-import com.mindprod.compactor.*;
public class Templates {
public static void write(String templateName, VelocityContext context, Writer writer) {
try {
- StringWriter sw = new StringWriter();
- if (Property.get("USE_HTML_COMPACTOR").equalsIgnoreCase("true")) {
- Framework.getVelocityEngine().mergeTemplate(templateName, "UTF-8", context, sw);
- Compactor compactor = new Compactor();
- writer.append(compactor.compactString(sw.toString(), templateName));
- } else {
- Framework.getVelocityEngine().mergeTemplate(templateName, "UTF-8", context, writer);
- }
+ Framework.getVelocityEngine().mergeTemplate(templateName, "UTF-8", context, writer);
} catch (ResourceNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Received on Thursday, 17 June 2010 15:24:21 UTC