PDA

View Full Version : Dear Dev Guys... A Schema for db.xml? Please?



Newawd
July 3rd, 2009, 22:00
Hey dev guys, I would LOVE to find a link to the whole schema for db.xml. I'm trying to build a GWT app that will let a DM make queries (for example, display all the passive perception scores for the PCs), and allow the players to view their characters when FG isn't running. I also would like to let players view their PCs while FG isn't running. The last thing (and the biggest reason I need the schema) is for me to be able to import a character from *hehem* certain character generators (which export xml) that will remain unnamed. :D

Thanks!
Newawd

Foen
July 3rd, 2009, 22:10
The schema would at once be both complex and simple.

Simple in that it is an arbitrary arrangement of intermediate nodes with only a few leaf-node types (designated with type='' attributes), and complex in that every ruleset and variant thereof has a different expected, named-and-type-based structure.

The Devs might provide the former (or you could infer from the documentation) but have no control over the latter.

Foen

Oberoten
July 3rd, 2009, 22:11
The problem here is really that each ruleset will give it's own structure. My Ars Magica ruleset is WASTLY different from Savage Worlds or D20 which in turn differs from eachother just as much.

- Obe

Foen
July 3rd, 2009, 22:12
On a somewhat less flippant front, there have been discussions around providing a standard XSL framework, which would allow each new ruleset to render/describe PCs (at least) for conversion to HTML or PDF - so printable character sheets could be produced.

Foen
July 3rd, 2009, 22:13
Beat you to it.

Newawd
July 3rd, 2009, 22:26
Hmm... So really the people to be asking for that schema are the ruleset guys? Is that the message I should take away from this? Thanks for the super prompt responses by the way...

Foen
July 3rd, 2009, 22:31
NP, but speaking as a 'ruleset guy', it would seem like quite a bit of work to determine and publish the schema, and the benefit would be limited to a small set of folks (IMHO).

The way FG works, the DB *isn't* designed first and the code fitted around it. Instead, the code is the focus, and the DB is self-evolving. As a result, the schema isn't trivial - it would need to be created by trawling through the code and identifying each valid path.

Foen

Newawd
July 3rd, 2009, 22:37
Hm. Is there really no validation performed on the db.xml file? As a software developer by trade, I can verify that it is almost unheard of for a company to have software that is going to be parsing and building XML without that XML being validated against a schema on the fly. Well... ok, not in the case of extremely small and simple XML... but db.xml is neither. :D

So FG doesn't currently do any kind of xml validation against a schema? Are you sure?

Griogre
July 4th, 2009, 01:26
FG just uses an xml file to hold and expose it's data. It doesn't really conform to full XML standards with this file its just like a save file to FG that happens to be in XML.

For the record, one of the new features of 2.4.x is you can view characters in campaigns you play when not connected.

Valarian
July 4th, 2009, 07:05
There are so many variations that the schema would end up just defining the tags that are valid in FGII (those defined in the Library) and state that they can be used basically anywhere. All you'd get out of a schema is perhaps a spell checker for the XML file tags.

By the way, if you look inside the Traveller and Corporation extensions you'll find XSLT stylesheets for the db.xml file of those rulesets for printing to HTML. I'm trying to provide stylesheets for printing characters with my rulesets now. Just extract the CharSheet.xsl and CharSheet.css from the file.