Lukas, 

That was it!! I feel like shooting myself. What an oversight. 

Thanks a ton for looking at it and spotting it.

- Mansi

On Thu, Jan 8, 2015 at 2:44 AM, Lukas Kircher <lukaskircher1@gmail.com> wrote:
Hi Mansi,

let $cmd := "/A/*/descendant::C/descandant::*[contains(@name,'"|| $n ||"')]”

Just a quick scan - I marked the problem in <bold> above - I would try ‘descendant’
instead of 'descandant’.

Cheers,
Lukas




--
- Mansi