[gnumeric] xml: back down schema version to v10.



commit 764f5b3e8bbd57915c8418d36e018ed4babccf5c
Author: Morten Welinder <terra gnome org>
Date:   Tue Mar 3 18:12:23 2015 -0500

    xml: back down schema version to v10.

 ChangeLog           |    6 ++++++
 src/xml-sax-read.c  |    1 +
 src/xml-sax-write.c |    9 +++++++--
 3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 27c0154..9f7d6b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-03  Morten Welinder  <terra gnome org>
+
+       * src/xml-sax-write.c (gnm_xml_file_save_full): Back down on the
+       version we write and document why we can't easily increase that
+       version.
+
 2015-03-02  Morten Welinder  <terra gnome org>
 
        * src/xml-io-version.h (GnumericXMLVersion): Add new dtd version.
diff --git a/src/xml-sax-read.c b/src/xml-sax-read.c
index f7c5225..2420640 100644
--- a/src/xml-sax-read.c
+++ b/src/xml-sax-read.c
@@ -2953,6 +2953,7 @@ xml_sax_go_doc (GsfXMLIn *xin, xmlChar const **attrs)
 /****************************************************************************/
 
 static GsfXMLInNS const content_ns[] = {
+       GSF_XML_IN_NS (GNM, "http://www.gnumeric.org/v14.dtd";), /* future */
        GSF_XML_IN_NS (GNM, "http://www.gnumeric.org/v13.dtd";),
        GSF_XML_IN_NS (GNM, "http://www.gnumeric.org/v12.dtd";),
        GSF_XML_IN_NS (GNM, "http://www.gnumeric.org/v11.dtd";),
diff --git a/src/xml-sax-write.c b/src/xml-sax-write.c
index d7b8b80..2782517 100644
--- a/src/xml-sax-write.c
+++ b/src/xml-sax-write.c
@@ -1465,9 +1465,14 @@ gnm_xml_file_save_full (G_GNUC_UNUSED GOFileSaver const *fs,
 
        gsf_xml_out_start_element (state.output, GNM "Workbook");
 
-       /* backwards compat, must be first */
+       /*
+        * As long as we want older versions of Gnumeric to be able to read
+        * the files we produce, we should not increase the version number
+        * in the file we write.  Until 1.12.21, v10 was the highest listed
+        * xml-sax-read.c's content_ns.
+        */
        gsf_xml_out_add_cstr_unchecked (state.output, "xmlns:gnm",
-               "http://www.gnumeric.org/v14.dtd";);
+               "http://www.gnumeric.org/v10.dtd";);
 #if 0 /* seems to break meta data */
        /* default namespace added for 1.8 */
        gsf_xml_out_add_cstr_unchecked (state.output, "xmlns",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]