Re: [xml] patch: registering namespaces to XPath context in xmllint shell

On Wed, Jun 16, 2004 at 02:06:53AM +0200, Stefano Debenedetti wrote:
Daniel Veillard wrote:
On Tue, Jun 08, 2004 at 09:25:57AM -0500, Eric Haszlakiewicz wrote:

The xmllint shell does need someway to specify prefix<->namespace 
mappings.  It not very useful without that.

 I take patches 
Based on the existing code xmlShell* in debugXML.c and the example
on how to register a namespace to a context in
that should not be hard, 

Here is a try at following that hint :-)
It adds a new "setns" command that requires one parameter in the 
prefix=[nsuri] format.

  Seems to look good and work just fine:

paphio:~/XML -> cat tst.xml
<comp1 xmlns=""/>
paphio:~/XML -> ./xmllint --shell tst.xml
/ > ls /comp1
/ > setns a=
/ > ls /a:comp1
--n        0 comp1
/ > quit
paphio:~/XML -> cat .memdump
      04:03:51 PM
      MEMORY ALLOCATED : 0, MAX was 12833
paphio:~/XML ->

  Applied and commited, thanks a lot !


Daniel Veillard      | Red Hat Desktop team
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]