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 13 Aug 2011 06:53:12 PM UTC  
 
Category: generalPriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sun 14 Aug 2011 03:25:01 PM UTC, 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 14 Aug 2011 09:19:50 AM UTC, 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 14 Aug 2011 07:25:23 AM UTC, 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 13 Aug 2011 09:38:55 PM UTC, 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 13 Aug 2011 06:53:12 PM UTC, 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

Cons:
- 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):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup