Re: [xml] namespaces in the dtd (xmlHasNsProp)

On Thu, Mar 07, 2002 at 05:05:22PM +0100, Uwe Fechner wrote:
Hello Daniel,

  hi Uwe,

  attr := xmlHasNSProp(xmlElement, pchar('attr'), pchar(''));

  // the fixed attribute is not found

  Damn another API bug, fixed in my tree now:

import libxml2
doc = libxml2.parseDoc(
... """<?xml version="1.0" encoding="iso-8859-1"?>
... <!DOCTYPE test [
... <!ELEMENT test (#PCDATA) >
... <!ATTLIST test xmlns:abc CDATA #FIXED ""; >
... <!ATTLIST test abc:attr CDATA #FIXED "def" >
... ]>
... <test />
... """)
elem = doc.getRootElement()
attr = elem.hasNsProp('attr', '')
print attr
<xmlAttr (attr) object at 0x811c0c0>
print attr.serialize()
<!ATTLIST test abc:attr CDATA #FIXED "def">

Any comments?

  Keep reporting API bugs, I will fix them, and now that I have scripting
capabilities I add regression tests at each step, so the status should
improve, I fixed xmlReconciliateNs() too.

   thanks !


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]