cloneNode and xml:id bug?

View: New views
3 Messages — Rating Filter:   Alert me  

cloneNode and xml:id bug?

by Bugzilla from brauliobo@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello.

I'm having a problem that might be a bug of libxml (or unprobably gdome).

When I use gdome_el_cloneNode with an element that has an xml:id attribute then the new cloned element get locked, in a way that xml:id can't be changed and is assigned to an empty string. Is this a normal behaviour? (PS: this occurs before the insertion of the cloned element with insertBefore.)

Regards,
bráulio

_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome

Re: [xml] cloneNode and xml:id bug?

by Daniel Veillard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Dec 15, 2008 at 04:06:29PM -0200, Bráulio Barros de Oliveira wrote:
> Hello.
>
> I'm having a problem that might be a bug of libxml (or unprobably gdome).
>
> When I use gdome_el_cloneNode with an element that has an xml:id attribute
> then the new cloned element get locked, in a way that xml:id can't be
> changed and is assigned to an empty string. Is this a normal behaviour? (PS:
> this occurs before the insertion of the cloned element with insertBefore.)

  I don't understand what a 'locked' element means, I don't see why you
  should not be able to fix the xml:id on a copied element. seems
  specific to gdome.

Daniel

--
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@...  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome

Re: [xml] cloneNode and xml:id bug?

by Bugzilla from brauliobo@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The strange thing is that if I *only* change the attribute name from "xml:id" on the DTD to "id" then everything works, except gdome_doc_getElementById. The type is kept ID for both names.
So, it is related with the attribute name.

bráulio

On Wed, Dec 17, 2008 at 3:21 PM, Daniel Veillard <veillard@...> wrote:
On Mon, Dec 15, 2008 at 04:06:29PM -0200, Bráulio Barros de Oliveira wrote:
> Hello.
>
> I'm having a problem that might be a bug of libxml (or unprobably gdome).
>
> When I use gdome_el_cloneNode with an element that has an xml:id attribute
> then the new cloned element get locked, in a way that xml:id can't be
> changed and is assigned to an empty string. Is this a normal behaviour? (PS:
> this occurs before the insertion of the cloned element with insertBefore.)

 I don't understand what a 'locked' element means, I don't see why you
 should not be able to fix the xml:id on a copied element. seems
 specific to gdome.

Daniel

--
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@...  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome