Re: HasAttributes - NameSpace

Luca Padovani <[email protected]> Thu, 12 May 2005 22:47:25 +0200
Newsgroups gmane.comp.gnome.gdome
Message-ID <1115930845.3053.22.camel@giraffe>
--===============0685604681==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature";
	boundary="=-d7StXiuF0GZXzx/yKEPA"


--=-d7StXiuF0GZXzx/yKEPA
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2005-05-12 at 19:42 +0530, Chetan Raj wrote:
> and I call hasAttributes as shown below on the document element
[...]
> The value of b obtained is FALSE.

If I'm not mistaken I would say this is a bug in gdome2. The problem
seems to be that the hasAttributes method is implemted by calling

	gdome_xmlGetAttrList

(gdome-xml-xmlutil.c:160) to test whether the node has any attribute
set, and this function looks into the "properties" field of the libxml2
node. However, libxml2 stores namespace declarations in a different
field named "nsDef", which is retrieved by=20

	gdome_xmlGetNsDeclList

(gdome-xml-xmlutil.c:174). So, an apparently simple patch seems to check
in=20

	gdome_xml_n_hasAttributes

(gdome-xml-node.c:1029) whether gdome_xml_n_hasAttributes returns a
non-NULL pointer. If Paolo agrees I can commit this patch.

Note that if you ask for the particular attribute "xmlns:abc" the
hasAttribute method returns true.

--luca

--=-d7StXiuF0GZXzx/yKEPA
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBCg8DcTJ/x5YuoHVwRArvOAJ9BA+yIOpRGaHb54rRLH13fRhuroQCcDISK
BR4rfnpvWi2KWmf/kyORgcY=
=f/73
-----END PGP SIGNATURE-----

--=-d7StXiuF0GZXzx/yKEPA--


--===============0685604681==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
gdome mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gdome

--===============0685604681==--