14

Is there a detailed description on the .qgs file structure somewhere?

I checked at http://mrcc.com/qgis.dtd and got

The requested URL /qgis.dtd was not found on this server.

and at https://svn.osgeo.org/qgis/trunk/qgis/qgis.dtd which wasn't very detailed.

  • Very good question, and surprised we can't find a writeup on the XML that makes up the .qgs file. It's fairly straightforward to figure out some sections and parse the file but full documentation should be somewhere! – Simbamangu Sep 11 '12 at 7:37
  • This good question got me a "tumbleweed" badge :D – Marty Sep 12 '12 at 8:29
  • Didn't even know such a thing existed! Not as bad as the 'unsung hero' badge but ouch ... can't believe no one has piped up with an answer yet. – Simbamangu Sep 12 '12 at 12:40
  • 1
    Here is the current file version: github.com/qgis/Quantum-GIS/blob/master/qgis.dtd – markusN Sep 13 '12 at 7:05
  • @markusN That is pretty much the same file as the one in svn.osgeo.org/qgis/trunk/qgis/qgis.dtd – R.K. Sep 16 '12 at 14:16
8
+25

It would seem there isn't. According to bug report #4408:

It's not possible to validate a QGIS project or style file against the called *.dtd (http://mrcc.com/qgis.dtd). Two reasons: the URL doesn't exist and using a *.dtd from SVN always returns a "non valid". Having the possibility to validate could decrease erroneous project files. As such it's a feature wish, but as long as QGIS mentions a *.dtd not working, it's a bug.

It was filed eleven months ago and last updated eight days ago. The target version for fixing the bug's version 2.0.0, too. If there is any detailed documentation then they'd have fixed it earlier, I think.

0

The DTD in git is hoplessly broken, <!ELEMENT maplayer ... > has unbalanced parentheses, there are multiple --- in comments, multiple missing types; and the bug report mentioned above has been sitting idle for 4 years.

  • A better approach would be to find a way to get the tickets closed. – underdark Oct 25 '15 at 22:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.