Search in sources :

Example 6 with Arg

use of org.apache.xpath.Arg in project robovm by robovm.

the class TransformerImpl method resetUserParameters.

/**
   * Reset parameters that the user specified for the transformation.
   * Called during transformer.reset() after we have cleared the 
   * variable stack. We need to make sure that user params are
   * reset so that the transformer object can be reused. 
   */
private void resetUserParameters() {
    try {
        if (null == m_userParams)
            return;
        int n = m_userParams.size();
        for (int i = n - 1; i >= 0; i--) {
            Arg arg = (Arg) m_userParams.elementAt(i);
            QName name = arg.getQName();
            // The first string might be the namespace, or it might be 
            // the local name, if the namespace is null.
            String s1 = name.getNamespace();
            String s2 = name.getLocalPart();
            setParameter(s2, s1, arg.getVal().object());
        }
    } catch (java.util.NoSuchElementException nsee) {
    // Should throw some sort of an error.
    }
}
Also used : QName(org.apache.xml.utils.QName) Arg(org.apache.xpath.Arg)

Aggregations

Arg (org.apache.xpath.Arg)6 QName (org.apache.xml.utils.QName)4