Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 3691
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: mirod [...] xmltwig.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.56
Fixed in: (no value)

Attachments


Subject: Bug in insertBefore?
Download (untitled) / with headers
text/plain 609b
Using the undef option in insertBefore does not seem to work. The doc states: $node->insertBefore( $newNode, $refNode ) insertBefore The method inserts $newNode before $refNode. If $refNode is unde- fined, the newNode will be set as the new first child of the parent node. This function differs from the DOM L2 specification, in the case, if the new node is not part of the document, the node will be imported first. With $refnode not set it appears the node is pasted after the last child of the parent (same behaviour as insertAfter) See the attached file for a short test case.
Download test_libxml_bug
application/octet-stream 1.6k

Message body not shown because it is not plain text.

Date: Mon, 1 Sep 2003 16:50:13 +0200
From: Christian Glahn <christian.glahn [...] uibk.ac.at>
To: via RT <bug-XML-LibXML [...] rt.cpan.org>
Subject: Re: [cpan #3691] Bug in insertBefore?
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1005b
On Mon, Sep 01, 2003 at 10:30:30AM -0400, via RT wrote: Show quoted text
> > This message about XML-LibXML was sent to you by MIROD <MIROD@cpan.org> via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=3691 > > > Using the undef option in insertBefore does not seem to work. > > The doc states: > > $node->insertBefore( $newNode, $refNode ) > > insertBefore > The method inserts $newNode before $refNode. If $refNode is unde- > fined, the newNode will be set as the new first child of the parent > node. This function differs from the DOM L2 specification, in the > case, if the new node is not part of the document, the node will be > imported first. > > With $refnode not set it appears the node is pasted after the last child of the parent (same behaviour as insertAfter)
This behaviour is defined in the DOM specification and was fixed recently. Apparently I forgot to update the docs, fixed in cvs. Christian


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.