Bug: upto 2 predefined namespaces in xml sel

Meat Bun
2010-05-26
2013-03-13
  • Meat Bun
    Meat Bun
    2010-05-26

    Hi folks,

    It must be something I don't know or a bug in XMLStarlet but there seem to be a limitation of number of predefined namespaces you can specify in sel command. For example, I'm trying to query some sections of a xml document that has a lot of namespaces, any predefined namespace after the 2nd one becomes invalid.

    C:\temp>xml sel -N rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" -N exif="http://ns.adobe.com/exif/1.0/" -N xap="http://ns.adobe.com/xap/1.0/" -t -c "//xap:*" namespace.xml | more

    output
    XPath error : Undefined namespace prefix
    xmlXPathCompiledEval: evaluation failed

    ed command seem to have no problem.

    Thanks.

    Baiz

     
  • Noam Postavsky
    Noam Postavsky
    2011-02-27

    I think this was bug 1722425 fixed in 1.0.2