ok.  My concern is that the 
queryNextUnquoted(path, '[')));

will skip over the /def, so 
    /abc[@x="3"]/def[@y="2"] 
will be treated the same as
    /abc[@x="3"][@y="2"]