patchFreeciv - Patches: patch #2903, [Metaticket] xml-files instead of...

Show feedback again

patch #2903: [Metaticket] xml-files instead of self-made section-file format

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Sat Aug 13 18:53:12 2011  
Category: generalPriority: 5 - Normal
Status: In ProgressPrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: 3.0.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sun Aug 14 15:25:01 2011, comment #4:

I did the create the new savegame format. At that time I did not change the basic structure (secfile). But XML seems to be a good idea. I do not know much about it, but one of the first tests could be the creation of a Document Type Definition (dtd) for the xml file. It could answer if it is possible:

> - Some features our own section file format has can be hard to implement using xml"

Matthias Pfafferodt <syntron>
Project Member
Sun Aug 14 09:19:50 2011, comment #3:

Let me start out by saying that i think this is a good idea, but the implementation will determine whether users have a good experience or not.

"- Dedicated xml-editors are easier for modpack authors to use than editing our section file format in notepad"

Absolutely. My feeling is that it should always be possible to do stuff like this by hand [in a text editor], being able to use off the shelf tools would be an improvement.

"- Adds libxml2 or expat dependency"

I'm not familiar with whether this is a more lightweight or heavyweight need. I guess there might be problems in Windows due to the usual MS tactic of them redefining the standard in some non-standard way?

"- Some features our own section file format has can be hard to implement using xml"

Is this abundant caution, or do you know of specific fields that would be mangled by XML? As long as we don't have anything that resembles an XML tag our stuff should pass through unmodified...


I like the initial view of the roadmap. I suppose during the transitional period we have a few choices:

1) Have the server able to read in several versions of savefiles and write them in a few selected [stable] versions. This will probably lead to charges of bloat.

2) Provide a converter utility for the interim period. It's extra work, but it keeps the server smaller and the user can delete it when no longer needed. Optionally such a function could be provided on the web where the user uploads an old savefile and downloads it in the new format.

3) Define a series of steps such that each release will only be able to read in files from the current or last release and only save in current release format. This puts a burden on the user when switching between different computers or even upgrading their distro.

David Lowe <doctorjlowe>
Sun Aug 14 07:25:23 2011, comment #2:

All the textual freeciv data files are in section file format: rulesets, tileset specifications, savegames, configuration files...

I also have been thinking about freeciv version numbering in relation to possible usage of xml-files. If we start using xml-files in large scale, I'd like to call that freeciv version 3.0, especially if there's major compatibility breaks:

2012 - Release 2.4 with no xml-stuff at all
2013 - Release 2.5 with xml supported to some extend, but not required
2014 - Release 3.0 with major switch to xml-files.

Marko Lindqvist <cazfi>
Project Administrator
Sat Aug 13 21:38:55 2011, comment #1:

Which freeciv-specific section file format? Scenarios? Rulesets? Maybe Wesnoth system (files .cfg for scenarios, units, etc.)?

I don't know xml/xslt, but I am interested (especially scenarios).

J. M. Gorbach <gorb>
Sat Aug 13 18:53:12 2011, original submission:

For years I have been thinking if we should start using xml-files instead of our current freeciv-specific section file format. Now it's time to at least open ticket about it for discussion.

I currently have in early design phase model where we would support multiple file-formats with api between the actual format implementation and rest of the code quite similar to what we currently have for different file compression methods. That we there would be no need to update every section file in existence at once, and to lose compatibility with old savegames, but we could support old section-file format and xml-files simultaneously.

Some benefits of using xml:
- Standard
- Possibility to later use xslt
- Dedicated xml-editors are easier for modpack authors to use than editing our section file format in notepad

- Adds libxml2 or expat dependency
- Some features our own section file format has can be hard to implement using xml

Marko Lindqvist <cazfi>
Project Administrator


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


   patch dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by syntron (Posted a comment)
  • -unavailable- added by doctorjlowe (Posted a comment)
  • -unavailable- added by gorb (Posted a comment)
  • -unavailable- added by cazfi (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Jan 4 09:01:37 2015cazfiStatusNone=>In Progress
      Planned Release=>3.0.0
    Sun Jan 4 09:01:03 2015cazfiDependencies-=>Depends on patch #5505
    Sun Jan 4 09:00:23 2015cazfiDependencies-=>Depends on patch #4915
    Sun Jan 4 09:00:07 2015cazfiDependencies-=>Depends on patch #4884
    Sun Jan 4 08:58:27 2015cazfiDependencies-=>Depends on patch #4849
    Sun Jan 4 08:58:02 2015cazfiDependencies-=>Depends on patch #4745
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup