GNOME Bugzilla – Bug 731832
Xml Shell command "cd" does not handle "/" at end of argument.
Last modified: 2014-07-14 10:02:21 UTC
Created attachment 278665 [details] [review] Fix cd XmlShell command to handle "/" at end of argument. Currently xml Shell supports "cd" command. But it fails if "/" is added at end of argument to "cd" command. For e.g : Success Cases : cd abc, cd .., cd abc/xyz Failure Cases : cd abc/, cd ../, cd abc/xyz/ Before Fix : ./xmllint --shell comment.xml / > cd doc doc > cd Year/Place Place > cd ../ XPath error : Invalid expression xmlXPathEval: evaluation failed ../: no such node Place > cd .. Year > cd Place/ XPath error : Invalid expression xmlXPathEval: evaluation failed Place/: no such node After Fix: ./xmllint --shell comment.xml / > cd doc doc > cd Year/Place Place > cd ../ Year > cd Place/ Place > The attach patch handle "/" at end of argument to cd command. Please apply attached patch.
Okay the problem is that the patch as is change cd / to not go through XPath evaluation and I think it should, so I pushed a slightly different patch but with same result, as 23243301a68ac56cc5dbfdcf2271589bd46fa71c thanks ! Daniel