XPathType (XmlTag element) { final XmlAttribute typeAttr = element.getAttribute("as"); final XPathType returnType; if (typeAttr != null) { final String value = typeAttr.getValue(); returnType = value != null ? XPath2Type.fromName(QNameUtil.createQName(value, element)) : null; return returnType != null ? returnType : XPathType.UNKNOWN; } return null; }