allowed for switching on node-type -- with the help of Michael I got this right.It is a little tricky to check whether a given node is a namespace node or attribute, have a look.This node-type switcher is also part of xpath++ tool

This function just returns the node-type as string, and below stylesheet node-kind.xsl does implement this for DataPower use.See this sample execution with a testcase for each return value, taken from the stylesheet itself (see "document('')" ):