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

Re: [xml] namespace decl attributes return false for HasValue



On Wed, Apr 09, 2003 at 02:46:10PM +0200, Denys Duchier wrote:
> Hi Daniel,
> 
> I have been using the xmlTextReader API in libxml2-2.5.6 on Gentoo.  I
> like it very much, but I have come across the following curious corner
> case: namespace declarations have NodeType=2 (i.e. attribute), return
> false for HasValue, and return the namespace URI for Value.  Is this
> intended behavior?  It seems a bit inconsistent to actually have a
> Value but return false for HasValue.

http://dotgnu.org/pnetlib-doc/System/Xml/XmlTextReader.html#XmlTextReader.Value%20Property

  seems to imply that Value for attribute should work that way,

> 
> I suspect that this could be fixed simply by adding:
> 
> case XML_NAMESPACE_DECL:
> 
> to the switch statement in the implementation of function
> xmlTextReaderHasValue in file xmlreader.c

  yes, that makes sense, done !

    thanks

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]