Ticket #5 (defect)

Opened 5 years ago

Last modified 5 years ago

Fix problems with cloning of nodes

Status: closed (fixed)

Reported by: johnny Assigned to: johnny
Priority: normal Milestone: 2 - Cleanup and solidity
Component: component1 Version:
Severity: major Keywords:
Cc:

The clone_node function has some trouble with retaining prefixes: if the node cloned is in a namespace other than the default, a prefix will be generated for that namespace, even if a prefix is already defined for it on a higher level (so instead of reusing the old prefix a new one is generated). This is especially cumbersome for HTML generation, where most of the times the actual prefix is used to determine the namespace of the element (due to IE's lack of proper namespace support).

Change History

09/15/05 11:56:38: Modified by johnny

  • status changed from new to closed.
  • resolution set to fixed.

This has been fixed: instead of manually cloning nodes, copy.deepcopy() is used. This, however, only works with the current SVN trunk of lxml.