/** copy the element, and contents to the result */ protected void evalCopy(ContentHandler responseTarget, FXContext context) throws Exception { // System.out.println("FXRequestServerSide::evalCopy()"); context = extendContext(context); if (context == null) { throw new Exception("null context"); } try { // copy the attributes AttributesImpl atts = new AttributesImpl(); // NamedNodeMap attsList = getAttributes(); SafeNodeIterator ni = getNode().getAttributes(); for (; ; ) { Node att = ni.next(); if (att == null) { break; } Name attName = att.getName(); String attNS = attName.getNamespace(); if (attNS == null) { attNS = ""; } String localName = attName.getLocalPart(); String anp = attName.getPrefix(); String qname = anp == null ? localName : (anp + ":" + localName); if (localName == null) { localName = qname; } String val = att.getData(); try { // FIXME: do not do unless needed if (val.indexOf('{') >= 0) { val = FXContextImpl.parseAttributeExpr(val, (FXContextImpl) context); // // Expression exp = // XRExp.parseExpr(new StringReader((String)val)); // StringWriter sw = new StringWriter(); // exp.eval(context, sw); // val = sw.toString(); } } catch (Throwable ex) { ex.printStackTrace(); val = "** expression error: " + // ex.getMessage() + "in [" + val + "] **"; } atts.addAttribute(attNS, localName, qname, "CDATA", val); } String nsURI = getNamespaceURI(); if (nsURI == null) { nsURI = ""; } String tagName = getTagName(); String localName = getNode().getName().getLocalPart(); // getLocalName(); evalBody(responseTarget, context, nsURI, localName, tagName, atts); } catch (Exception ex) { ex.printStackTrace(); errorResponse(ex, responseTarget, context); } }