key = new Value(getEscapedExpression(textValue)); key.setNamespaces(elem); } else {
key = new Value(getEscapedExpression(attributeValue)); key.setNamespaces(elem); } else {
/** * Create a key instance * * @param elem OMElement * @return Key */ public Value createValue(String name, OMElement elem) { Value key = null; OMAttribute attKey = elem.getAttribute(new QName(name)); if (attKey != null) { String attributeValue = attKey.getAttributeValue(); boolean hasEscape = isEscapedExpression(attributeValue); if (!hasEscape && isDynamicKey(attributeValue)) { /** dynamic key */ SynapseXPath synXpath = createSynXpath(elem, attributeValue); key = new Value(synXpath); } else if (hasEscape) { /** escaped expr */ key = new Value(getEscapedExpression(attributeValue)); key.setNamespaces(elem); } else { /** static key */ key = new Value(attributeValue); } } else { handleException("The '" + name + "' attribute is required on the " + elem.getLocalName() + " element"); } return key; }