From 460584a73a4a01728480e2c8fca2719f6fc45aa9 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Tue, 10 Jul 2001 16:58:38 +0000 Subject: [PATCH] Remove redundant get... methods (now centralized in Param) --- .../xalan2/com/nwalsh/xalan/Table.java | 57 ------------------- 1 file changed, 57 deletions(-) diff --git a/xsl/extensions/xalan2/com/nwalsh/xalan/Table.java b/xsl/extensions/xalan2/com/nwalsh/xalan/Table.java index 6b5fddb32..bad7039e2 100644 --- a/xsl/extensions/xalan2/com/nwalsh/xalan/Table.java +++ b/xsl/extensions/xalan2/com/nwalsh/xalan/Table.java @@ -172,63 +172,6 @@ public class Table { return pixels; } - /** - *

Find the string value of a stylesheet variable or parameter

- * - *

Returns the string value of varName in the current - * context. Returns the empty string if the variable is - * not defined.

- * - * @param context The current stylesheet context - * @param varName The name of the variable (without the dollar sign) - * - * @return The string value of the variable - */ - private String getStringVariable(ExpressionContext context, - String varName) { - try { - XPathContext xpc = (XPathContext) context; - XObject var = xpc.getVariable(new QName(varName)); - if (var != null) { - return var.toString(); - } else { - System.out.println("$" + varName + " is not a defined parameter."); - return ""; - } - } catch (TransformerException te) { - System.out.println("Transformer exception getting value of $" + varName); - return ""; - } - } - - private int getIntVariable(ExpressionContext context, - String varName) { - String stringValue = getStringVariable(context, varName); - if (stringValue != null) { - try { - int value = Integer.parseInt(stringValue); - return value; - } catch (NumberFormatException e) { - System.out.println("$" + varName + " is not an integer."); - } - } - return 0; - } - - private boolean getBooleanVariable(ExpressionContext context, - String varName) { - String stringValue = getStringVariable(context, varName); - if (stringValue != null) { - if (stringValue.equals("0") || stringValue.equals("")) { - return false; - } else { - return true; - } - } else { - return false; - } - } - /** *

Adjust column widths in an HTML table.

* -- 2.40.0