protected Apply(Element apply, FieldMetaInfo.Optype opType, ArrayList<Attribute> fieldDefs,
      TransformationDictionary transDict) 
    throws Exception {
    super(opType, fieldDefs);
    
    String functionName = apply.getAttribute("function");
    if (functionName == null || functionName.length() == 0) {
      // try the attribute "name" - a sample file produced by MARS
      // uses this attribute name rather than "function" as defined
      // in the PMML spec
      functionName = apply.getAttribute("name");
    }
    
    if (functionName == null || functionName.length() == 0) {
      throw new Exception("[Apply] No function name specified!!");
    }
    //System.err.println(" *** " + functionName);
    m_function = Function.getFunction(functionName, transDict);
    
    // now read the arguments
    NodeList children = apply.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
      Node child = children.item(i);
      if (child.getNodeType() == Node.ELEMENT_NODE) {
        String tagName = ((Element)child).getTagName();
        if (!tagName.equals("Extension")) {
          //System.err.println(" ++ " + tagName);
          Expression tempExpression = 
            Expression.getExpression(tagName, child, m_opType, m_fieldDefs, transDict);
          if (tempExpression != null) {
            m_arguments.add(tempExpression);
          }
        }
      }
    }
    
    if (fieldDefs != null) {
      updateDefsForArgumentsAndFunction();
    }
  }