Author Topic: Element order in the XML file  (Read 209 times)

eudoxos

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
  • Scribus User
Element order in the XML file
« on: July 02, 2017, 12:56:30 am »
Hi, I am moving to editing the SLA file with python and ElementTree directly (instead attempting to extend scripter). I am currently working on comic translation and merging collaboratively updated translation form google docs (downloaded as plain text) into the scribus file. The ordering of text frames (with opaque background, in a layer above the background PDF of the original) is, obviously, important: the script finds some tag for page and then fills text frame line-by-line from the text file (each frame has default style assigned).

Can I somewhat rely on the ordering in SLA (in the implementation as it is now, 1.5.4svn) or is it arbitrary and changing and I better annotate (cumbersome) all text frames and use that as identifier? It seems frames are saved in the order as I created them?

Cheers! Vaclav

Nermander

  • Hero Member
  • *****
  • Posts: 1133
  • Karma: 15
Re: Element order in the XML file
« Reply #1 on: July 02, 2017, 08:54:50 pm »
From what I have read the order of items in the SLA is the order in which they were created. This would mean an added text frame on page 1 still ends up at the end of the SLA.

This may have changed lately, but I don't think so.

It has been said more than once that Scribus does not use XML in a well structured way.

 

palmate