public void addAttribute(String name, String value) { if (_openElementName != null) { _attributes.add(name, value); } else { BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, name); } }
/** * Add a new global parameter if not already in the current frame. * To setParameters of the form {http://foo.bar}xyz * This needs to get mapped to an instance variable in the class * The mapping created so that * the global variables in the generated class become * http$colon$$flash$$flash$foo$dot$bar$colon$xyz */ public final Object addParameter(String name, Object value) { name = BasisLibrary.mapQNameToJavaName (name); return addParameter(name, value, false); }
protected Object clone() { HashtableEntry entry = new HashtableEntry(); entry.hash = hash; entry.key = key; entry.value = value; entry.next = (next != null) ? (HashtableEntry)next.clone() : null; return entry; } }
/** * Implements JAXP's Transformer.clearParameters() * Clear all parameters set with setParameter. Clears the translet's * parameter stack. */ public void clearParameters() { if (_isIdentity && _parameters != null) { _parameters.clear(); } else { _translet.clearParameters(); } }
/** * Implements JAXP's Transformer.getParameter() * Returns the value of a given parameter. Note that the translet will not * keep values for parameters that were not defined in the stylesheet. * * @param name The name of the parameter * @return An object that contains the value assigned to the parameter */ public final Object getParameter(String name) { if (_isIdentity) { return (_parameters != null) ? _parameters.get(name) : null; } else { return _translet.getParameter(name); } }
/** * External functions that cannot be resolved are replaced with a call * to this method. This method will generate a runtime errors. A good * stylesheet checks whether the function exists using conditional * constructs, and never really tries to call it if it doesn't exist. * But simple stylesheets may result in a call to this method. * The compiler should generate a warning if it encounters a call to * an unresolved external function. */ public static void unresolved_externalF(String name) { runTimeError(EXTERNAL_FUNC_ERR, name); }
/** * Returns an enumeration of the keys in this hashtable. */ public Enumeration keys() { return new HashtableEnumerator(table, true); }
public String toString() { return Operators.getOpNames(_op) + '(' + _left + ", " + _right + ')'; } }
public Class getAuxiliaryClass(String className) { if (_auxClasses == null) return null; return((Class)_auxClasses.get(className)); }
public SerializationHandler openOutputHandler(String filename) throws TransletException { return openOutputHandler(filename, false); }
/** * SAX2: Look up an attribute's value by Namespace name - SLOW! */ public String getValue(String uri, String localName) { return(getValue(uri+':'+localName)); }
protected void addAttribute(String qname, String value) { _attributes.add(qname, value); }
/** * Utility function to throw a runtime error on the use of an extension * function when the secure processing feature is set to true. */ public static void unallowed_extension_functionF(String name) { runTimeError(UNALLOWED_EXTENSION_FUNCTION_ERR, name); }
/** * Returns an enumeration of the values in this hashtable. * Use the Enumeration methods on the returned object to fetch the elements * sequentially. */ public Enumeration elements() { return new HashtableEnumerator(table, false); }
public String toString() { return Operators.getOpNames(_op) + '(' + _left + ", " + _right + ')'; }
/** * Retrieves a named DecimalFormat object from _formatSymbols hashtable. */ public final DecimalFormat getDecimalFormat(String name) { if (_formatSymbols != null) { // The name cannot be null - use empty string instead if (name == null) name = EMPTYSTRING; DecimalFormat df = (DecimalFormat)_formatSymbols.get(name); if (df == null) df = (DecimalFormat)_formatSymbols.get(EMPTYSTRING); return df; } return(null); }
/** * Utility function to throw a runtime error on the use of an extension * element when the secure processing feature is set to true. */ public static void unallowed_extension_elementF(String name) { runTimeError(UNALLOWED_EXTENSION_ELEMENT_ERR, name); }
/** * Utility function to throw a runtime error for an unsupported element. * * This is only used in forward-compatibility mode, when the control flow * cannot be determined. In 1.0 mode, the error message is emitted at * compile time. */ public static void unsupported_ElementF(String qname, boolean isExtension) { if (isExtension) runTimeError(UNSUPPORTED_EXT_ERR, qname); else runTimeError(UNSUPPORTED_XSL_ERR, qname); }
public static void runTimeError(String code, Object arg0) { runTimeError(code, new Object[]{ arg0 } ); }