Re: [xml] Bug 502960: XML namespaces and SAX

2007-12-27 Thread Red
On Dec 21, 2007 6:59 PM, Daniel Veillard [EMAIL PROTECTED] wrote: Retake your example but make the content foo bar xmlns=bartest;/bar bar xmlns=bar2test;/bar /foo When the person who wrote the entity test in your document system maybe it assumed a bar namespace, maybe it assumed no

Re: [xml] Bug 502960: XML namespaces and SAX

2007-12-21 Thread Daniel Veillard
On Thu, Dec 20, 2007 at 10:52:53AM -0800, Red wrote: [1]http://bugzilla.gnome.org/show_bug.cgi?id=502960 See the bug for details, but this seems to be a bona fide libxml bug: when an entity reference is parsed using SAX, any associated namespaces from enclosing nodes

[xml] Bug 502960: XML namespaces and SAX

2007-12-20 Thread Red
http://bugzilla.gnome.org/show_bug.cgi?id=502960 See the bug for details, but this seems to be a bona fide libxml bug: when an entity reference is parsed using SAX, any associated namespaces from enclosing nodes are not inherited. Please have a look and let me know if you agree.

[xml] namespaces redeclarations

2007-04-17 Thread Arne Van Theemsche
Hi I use the perl interfaces to libxml2 imagine I parse an xml like foo xmlns:ns2=http://www.foo.bar ns2:bar/ /foo and then i do a createElementNS(http://www.foo.bar,bar2;) and an appendChild on the ns2:bar I will end up in something like foo xmlns:ns2=http://www.foo.bar ns2:barbar2

Re: [xml] namespaces redeclarations

2007-04-17 Thread Petr Pajas
On Tuesday 17 April 2007, Arne Van Theemsche wrote: Hi I use the perl interfaces to libxml2 I'm the current maintainer of it. XML::LibXML is not discussed here but on [EMAIL PROTECTED] imagine I parse an xml like foo xmlns:ns2=http://www.foo.bar ns2:bar/ /foo and then i do a

Re: [xml] Namespaces! Agh!

2006-07-02 Thread ensonic
Would it make sense to add a #define XML_NS_NULL (-1) for that purpose and handle it respectively? Still not nice though. Stefan On 9:34:38 pm 01/07/2006 Nic James Ferrier [EMAIL PROTECTED] wrote: Ok. Here's something I don't understand about namespaces (libxml2 in python): dom =

[xml] Namespaces! Agh!

2006-07-01 Thread Nic James Ferrier
Ok. Here's something I don't understand about namespaces (libxml2 in python): dom = libxml2.newDoc(1.0) root = dom.newChild(None, root, None) ns = root.newNs(http://www.tfnet.co.uk/somenamespace;, ns) root.setNs(ns) node = root.newChild(ns, element, None)

Re: [xml] Namespaces! Agh!

2006-07-01 Thread Daniel Veillard
On Sat, Jul 01, 2006 at 08:34:38PM +0100, Nic James Ferrier wrote: Ok. Here's something I don't understand about namespaces (libxml2 in python): dom = libxml2.newDoc(1.0) root = dom.newChild(None, root, None) ns = root.newNs(http://www.tfnet.co.uk/somenamespace;, ns)

Re: [xml] Namespaces! Agh!

2006-07-01 Thread Nic James Ferrier
Daniel Veillard [EMAIL PROTECTED] writes: On Sat, Jul 01, 2006 at 08:34:38PM +0100, Nic James Ferrier wrote: Well basically xmlNewChild() create a new node in the parent namespace if no namespace is provided. Try to setNs(None) on the resulting node. Okay the API is a bit weird, but

Re: [xml] Namespaces! Agh!

2006-07-01 Thread Daniel Veillard
On Sat, Jul 01, 2006 at 10:35:48PM +0100, Nic James Ferrier wrote: Daniel Veillard [EMAIL PROTECTED] writes: On Sat, Jul 01, 2006 at 08:34:38PM +0100, Nic James Ferrier wrote: Well basically xmlNewChild() create a new node in the parent namespace if no namespace is provided. Try to

[xml] namespaces

2006-06-20 Thread boss
hi trying to parse this xml fragment ?xml version=1.0 encoding=UTF-8? rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns=http://purl.org/rss/1.0/; xmlns:perljobs=http://jobs.perl.org/rss/; xmlns:taxo=http://purl.org/rss/1.0/modules/taxonomy/;

Re: [xml] namespaces

2006-06-20 Thread Buchcik, Kasimier
:32 PM To: xml@gnome.org Subject: [xml] namespaces hi trying to parse this xml fragment ?xml version=1.0 encoding=UTF-8? rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns=http://purl.org/rss/1.0/; xmlns:perljobs=http://jobs.perl.org/rss/; xmlns:taxo=http://purl.org/rss

Re: [xml] namespaces

2006-06-20 Thread Daniel Veillard
On Tue, Jun 20, 2006 at 04:32:00PM +0300, [EMAIL PROTECTED] wrote: hi trying to parse this xml fragment ?xml version=1.0 encoding=UTF-8? rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns=http://purl.org/rss/1.0/; xmlns:perljobs=http://jobs.perl.org/rss/;

Re: [xml] namespaces

2006-06-20 Thread boss
on this. thank's greger Regards, Kasimier -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 3:32 PM To: xml@gnome.org Subject: [xml] namespaces hi trying to parse this xml fragment ?xml version=1.0 encoding=UTF

[xml] Namespaces

2006-03-20 Thread Olaf Gellert
Hi all, I was just wondering how to use namespaces with libxml2. I do something like: document = xmlNewDoc((const xmlChar *) 1.0); root = xmlNewDocNode(document, NULL, (const xmlChar *) IDMEF-Message, NULL); idmefNS=xmlNewNs(root, (const xmlChar *) http://iana.org/idmef;,

Re: [xml] Namespaces

2006-03-20 Thread Kasimier Buchcik
Hi, On Mon, 2006-03-20 at 11:00 -0500, Jason Viers wrote: [...] When children are created, they automatically inherit their parents' ns, so as long as you call xmlSetNs before any further children are added, they'll use the prefix too. If you want a child node to NOT use the prefix, just