Ticket #3 (task)

Opened 5 years ago

Last modified 4 years ago

Get behaviour of content and replace defined properly

Status: closed (fixed)

Reported by: johnny Assigned to: johnny
Priority: normal Milestone: 4 - Finalization
Component: component1 Version:
Severity: normal Keywords:
Cc: johnny

Currently the behaviour/semantics of content and replace are rather vague. What happens with the existing contents is somewhat vague, and perhaps not really useful: for instance when a string is used for content for an element that has string contents and tags, the element's .text property will be set to the text, replacing the original text, and the children are left in tact. When an element is used instead of a string, the element is *appended* the the children array, rather than replacing it. Do we want to remove the children instead? Do we want this behaviour of adding rather than replacing to work for text too, and concatenate the original .text value with the new content? Do we want to set the tail of the last child instead of the text of the parent?

Change History

09/06/05 00:02:43: Modified by anonymous

  • cc set to johnny.

07/03/06 09:18:01: Modified by anonymous

  • severity changed from normal to blocker.
  • component changed from component1 to component2.
  • priority changed from normal to high.
  • version set to 2.0.
  • milestone deleted.
  • type changed from defect to enhancement.

07/03/06 09:18:32: Modified by anonymous

  • severity changed from blocker to normal.
  • component changed from component2 to component1.
  • priority changed from high to highest.
  • version deleted.
  • milestone set to 2 - Cleanup and solidity.
  • type changed from enhancement to task.

07/05/06 13:17:19: Modified by johnny

  • priority changed from highest to high.
  • type changed from task to enhancement.
  • reporter changed from anonymous to johnny.

07/07/06 21:48:52: Modified by anonymous

  • severity changed from normal to major.
  • component changed from component1 to component2.
  • priority changed from high to low.
  • version set to 1.0.
  • milestone changed from 2 - Cleanup and solidity to 1 - Feature completeness.
  • type changed from enhancement to defect.

07/07/06 21:48:57: Modified by anonymous

  • severity changed from major to normal.
  • component changed from component2 to component1.
  • priority changed from low to normal.
  • version deleted.
  • milestone changed from 1 - Feature completeness to 4 - Finalization.
  • type changed from defect to task.

07/17/06 15:28:07: Modified by johnny

Seems that t:content repeats the tail, which it shouldn't do. It should keep it in tact for the last item, and remove it for the rest.

Another issue I found is in processing the nodes: when there's a t:attr on a node that also has a t:content with list valued data, the t:attr should be resolved within the loop of the t:content, this to allow setting e.g. class for each item in the list. Another option would be to not remove the element at all, but really only its content (not sure about that one though).

09/17/06 13:28:23: Modified by johnny

  • status changed from new to assigned.

I just replaced lxml with a SAX based solution, which makes it all a lot less icky (no text and tail bits and such). I think this will make this issue void basically, but let's test some more IRL before I resolve it.

11/01/06 18:51:15: Modified by dghdfgh

11/02/06 19:01:18: Modified by ertDrjinklikeafish

11/02/06 20:23:21: Modified by ecoetrnstancasdfe

http://xoomer.alice.it/it_hfhgfs/modem.html http://xoomer.alice.it/it_hfhgfs/modem-adsl.html http://xoomer.alice.it/it_hfhgfs/cable-modem.html http://xoomer.alice.it/it_hfhgfs/driver-modem.html http://xoomer.alice.it/it_hfhgfs/modem-modem-adsl.html http://xoomer.alice.it/it_hfhgfs/modem-wi-fi.html http://xoomer.alice.it/it_hfhgfs/offerta-modem-adsl.html http://xoomer.alice.it/it_hfhgfs/adsl-modem.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-wireless.html http://xoomer.alice.it/it_hfhgfs/adsl-modem-router.html http://xoomer.alice.it/it_hfhgfs/modem-ethernet.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-usb.html http://xoomer.alice.it/it_hfhgfs/cable-modem-isp.html http://xoomer.alice.it/it_hfhgfs/modem-adsl.html http://xoomer.alice.it/it_hfhgfs/driver-modem-k-n.html http://xoomer.alice.it/it_hfhgfs/fax-modem.html http://xoomer.alice.it/it_hfhgfs/modem-isdn.html http://xoomer.alice.it/it_hfhgfs/configurazione-modem-adsl.html http://xoomer.alice.it/it_hfhgfs/scheda-rete-modem.html http://xoomer.alice.it/it_hfhgfs/modem-router.html http://xoomer.alice.it/it_hfhgfs/modem-alcatel.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-ethernet.html http://xoomer.alice.it/it_hfhgfs/modem-alice-adsl.html http://xoomer.alice.it/it_hfhgfs/modem-interno.html http://xoomer.alice.it/it_hfhgfs/modem-linux.html http://xoomer.alice.it/it_hfhgfs/modem-fax.html http://xoomer.alice.it/it_hfhgfs/modem-motorola.html http://xoomer.alice.it/it_hfhgfs/driver-modem-adsl.html http://xoomer.alice.it/it_hfhgfs/modem-isdn-usb.html http://xoomer.alice.it/it_hfhgfs/adsl-modem-driver.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-alice.html http://xoomer.alice.it/it_hfhgfs/modem-k.html http://xoomer.alice.it/it_hfhgfs/adsl-usb-modem.html http://xoomer.alice.it/it_hfhgfs/adsl-ethernet-modem.html http://xoomer.alice.it/it_hfhgfs/driver-modem-o-s.html http://xoomer.alice.it/it_hfhgfs/isdn-modem.html http://xoomer.alice.it/it_hfhgfs/modem-usb.html http://xoomer.alice.it/it_hfhgfs/usb-modem.html http://xoomer.alice.it/it_hfhgfs/driver-modem-isdn-ta-usb.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-interno.html http://xoomer.alice.it/it_hfhgfs/configurare-modem-isdn-asus-ta.html http://xoomer.alice.it/it_hfhgfs/usb-adsl-modem.html http://xoomer.alice.it/it_hfhgfs/modem-alice.html http://xoomer.alice.it/it_hfhgfs/modem-ethernet-adsl.html http://xoomer.alice.it/it_hfhgfs/modem-router-adsl.html http://xoomer.alice.it/it_hfhgfs/modem-wireless.html http://xoomer.alice.it/it_hfhgfs/modem-umts.html http://xoomer.alice.it/it_hfhgfs/modem-com.html

11/03/06 01:05:22: Modified by qwerhumphrieagd

http://xoomer.alice.it/it_hfhgfs/router-modem-adsl.html http://xoomer.alice.it/it_hfhgfs/modem-driver.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-pirelli.html http://xoomer.alice.it/it_hfhgfs/modem-gprs.html http://xoomer.alice.it/it_hfhgfs/modem-esterni.html http://xoomer.alice.it/it_hfhgfs/asuscom-modem-isdn.html http://xoomer.alice.it/it_hfhgfs/adsl-ethernet-router-modem-switch.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-esterni.html http://xoomer.alice.it/it_hfhgfs/modem-pci.html http://xoomer.alice.it/it_hfhgfs/modem-usb-adsl.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-per-mac.html http://xoomer.alice.it/it_hfhgfs/modem-router-wireless-adsl.html http://xoomer.alice.it/it_hfhgfs/configurare-modem-adsl.html http://xoomer.alice.it/it_hfhgfs/driver-modem-isdn-usb-infineon.html http://xoomer.alice.it/it_hfhgfs/motorola-sm-pci-fax-modem.html http://xoomer.alice.it/it_hfhgfs/modem-asus-isdn.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-pcmcia.html http://xoomer.alice.it/it_hfhgfs/prezzo-modem-adsl.html http://xoomer.alice.it/it_hfhgfs/modem-wifi.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-linux.html http://xoomer.alice.it/it_hfhgfs/driver-modem-t-z.html http://xoomer.alice.it/it_hfhgfs/motorola-sm-fax-modem.html http://xoomer.alice.it/it_hfhgfs/driver-modem-motorola.html http://xoomer.alice.it/it_hfhgfs/linksys-modem-adsl.html http://xoomer.alice.it/it_hfhgfs/installare-modem-adsl.html http://xoomer.alice.it/it_hfhgfs/modem-router-adsl-pirelli-password.html http://xoomer.alice.it/it_hfhgfs/best-data-fax-modem-driver.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-prezzo.html http://xoomer.alice.it/it_hfhgfs/modem-gprs-usb.html http://xoomer.alice.it/it_hfhgfs/elsa-usb-isdn-modem-drivers.html http://xoomer.alice.it/it_hfhgfs/adsl-modem-linux.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-router.html http://xoomer.alice.it/it_hfhgfs/costo-modem-adsl.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-ericsson.html http://xoomer.alice.it/it_hfhgfs/k-fax-modem.html http://xoomer.alice.it/it_hfhgfs/modem-isdn-dominium.html http://xoomer.alice.it/it_hfhgfs/driver-modem-f-j.html http://xoomer.alice.it/it_hfhgfs/us-robotics-k-fax-modem-driver.html http://xoomer.alice.it/it_hfhgfs/modem-gsm.html http://xoomer.alice.it/it_hfhgfs/modem-isdn-k.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-alcatel.html http://xoomer.alice.it/it_hfhgfs/best-data-fax-modem.html http://xoomer.alice.it/it_hfhgfs/modem-router-adsl-wireless.html http://xoomer.alice.it/it_hfhgfs/modem-adsl-wi-fi.html http://xoomer.alice.it/it_hfhgfs/alcatel-adsl-modem.html http://xoomer.alice.it/it_hfhgfs/mettere-modem-isdn-adsl.html http://xoomer.alice.it/it_hfhgfs/modem-fax-gsm.html http://xoomer.alice.it/it_hfhgfs/motorola-modem-driver.html http://xoomer.alice.it/it_hfhgfs/modem-isdn-apple.html http://xoomer.alice.it/it_hfhgfs/usb-v--fax-modem.html http://xoomer.alice.it/it_hfhgfs/ericsson-modem-adsl.html http://xoomer.alice.it/it_hfhgfs/linux-modem-adsl.html

01/16/07 12:17:04: Modified by johnny

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

I would say this is resolved after replacing lxml with nanosax. The behaviour is now simple and predictable. If there's a specific bit of behaviour that needs to be changed, let's use a new ticket.