Re: [xml] xmllint -shell and namespaces?

On Tue, May 07, 2002 at 05:15:58PM -0400, Artur Klauser wrote:
So, if "cd foo" does not work, what does? - other than anonymous 
references like the above "cd node()".

  the command uses an XPath argument. in XPath "foo" selects 
children element of name foo but without namespace. So that's normal.

BTW, I have similar problems if the namespace is explicit, ie. if all tags 
are prefixed with say f: and I declare xmlns:f=""; in the 
document root element. Here, neither "cd foo" nor "cd f:foo" do the trick.

  yes because at the shell level there is no way to bind namespaces to 
prefixes for XPath expressions (patch welcome could be simple).
  You can use  local-name() and namespace-uri() XPath functions in the mean
    cd *[local-name() = 'foo']



Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]