Re: [xml] xmllint and namespaces



On Thu, Oct 24, 2002 at 11:22:37AM +0200, Stefan Kost wrote:
Hi Daniel,

Thanks for your help, but I am not over with the issue. I prefered not to 
pollute my files and so I got rid of the namespace prefix (as I will not mix my 
xml-data with other). So

<giml:giml xmlns:giml="http://gitk.sourceforge.net/";>
    <giml:context/>
</giml:giml>

has been changed to

<giml xmlns="http://gitk.sourceforge.net/";>
    <context/>
</giml>

I keep the default namespace. No all of my xpath queries are broken.

  Read the XPath spec. the "giml" XPath expression will only select
nodes of name "giml" but without namespace. You need to keep the namespace
in the XPath query to match those node.
  Sorry I can't debug the code. I assume the problem comes from what
I just said.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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