xml inclusion supported for cfg files?

Talk among developers, and propose and discuss general development planning/tackling/etc... feature in this forum.
Post Reply
pheldens
Bounty Hunter
Bounty Hunter
Posts: 178
Joined: Mon Sep 26, 2005 1:15 am

xml inclusion supported for cfg files?

Post by pheldens »

Code: Select all

<?xml version='1.0'?>
<mydocument xmlns:xinclude="http://www.w3.org/1999/XML/xinclude">
<xinclude:include href="custom_joystick.xml" parse="cdata"/>
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Is that standard xml?
I guess it's not supported, but it could be made so.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Zeog
ISO Party Member
ISO Party Member
Posts: 453
Joined: Fri Jun 03, 2005 10:30 am
Location: Europe

Post by Zeog »

It seems to be a realtively new standard/W3C recommendation (Nov. 15, 2006).
http://www.w3.org/TR/xinclude/
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

libxml probably has some support for XInclude (I found some old references to it from 2000), but Vega Strike code will also have to support inclusion (the parser just reads from a data buffer)

A bigger problem is that the configurator is not an XML parser.
Rather, vssetup just hunts through the file for XML comments. This means that it will need to be trained to parse XInclude tags too.

I think a better solution may be to have a complete XML option editor that supports key/joystick bindings, and changing option values.
Unfortunately this isn't going to happen very soon either. First, we would have to track down every place certain things are used.

Actually, it may be possible to only edit keybindings, and nothing else, as part of vssetup, but it may still become more complicated than just opening the file up in a text editor.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

I have a small XML parsing/generation class (based on expat) that I designed specifically for that kind of task: editing. It preserves whitespace, comments, and everything you'd like it to preserve, yet presents the data structured and quickly accessible.

It'd kind of a TinyXML, but smaller (yes, smaller) and more suited to that particular task (and some others I want it to be suitable for).

I think it's been commited to SVN, in the Ogre branch.
I think.

Making a configuration editor with include support with that would be pretty simple.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Post Reply