[gnumeric] Make the created xlsx files schema-compliant



commit 146f6a6340d5ef2d492e64b7a05a2d2e4d95a728
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Fri Jun 24 15:31:25 2011 -0600

    Make the created xlsx files schema-compliant
    
    2011-06-24  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* xlsx-write.c (xlsx_write_shared_strings): xml:space is
    	not allowed
    	(xlsx_write_styles): ditto
    	(xlsx_write_workbook): ditto
    	* xlsx-write-docprops.c (xlsx_write_docprops_app): ditto
    	(xlsx_write_docprops_core): ditto

 plugins/excel/ChangeLog             |    9 +++++++++
 plugins/excel/xlsx-write-docprops.c |    2 --
 plugins/excel/xlsx-write.c          |    6 +++---
 3 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 990eeaf..104d956 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,14 @@
 2011-06-24  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* xlsx-write.c (xlsx_write_shared_strings): xml:space is
+	not allowed
+	(xlsx_write_styles): ditto
+	(xlsx_write_workbook): ditto
+	* xlsx-write-docprops.c (xlsx_write_docprops_app): ditto
+	(xlsx_write_docprops_core): ditto
+
+2011-06-24  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* xlsx-write.c (xlsx_write_fonts): check the font names
 	just in case
 	(xlsx_write_rich_text): we definitely need to check the text
diff --git a/plugins/excel/xlsx-write-docprops.c b/plugins/excel/xlsx-write-docprops.c
index b5ba41e..e713ebe 100644
--- a/plugins/excel/xlsx-write-docprops.c
+++ b/plugins/excel/xlsx-write-docprops.c
@@ -42,7 +42,6 @@ xlsx_write_docprops_app (XLSXWriteState *state, GsfOutfile *root_part, GsfOutfil
 	
 	gsf_xml_out_start_element (xml, "Properties");
 	gsf_xml_out_add_cstr_unchecked (xml, "xmlns", ns_docprops_extended);
-	gsf_xml_out_add_cstr_unchecked (xml, "xml:space", "preserve");
 	gsf_xml_out_start_element (xml, "Application");
 	gsf_xml_out_add_cstr_unchecked (xml, NULL, PACKAGE_NAME);
 	gsf_xml_out_end_element (xml); /* </Application> */
@@ -168,7 +167,6 @@ xlsx_write_docprops_core (XLSXWriteState *state, GsfOutfile *root_part, GsfOutfi
 	gsf_xml_out_add_cstr_unchecked (xml, "xmlns:dcmitype", ns_docprops_core_dcmitype);
 	gsf_xml_out_add_cstr_unchecked (xml, "xmlns:dcterms", ns_docprops_core_dcterms);
 	gsf_xml_out_add_cstr_unchecked (xml, "xmlns:xsi", ns_docprops_core_xsi);
-	gsf_xml_out_add_cstr_unchecked (xml, "xml:space", "preserve");
 
 	gsf_doc_meta_data_foreach (meta, (GHFunc) xlsx_meta_write_props, xml);
 	if (prop != NULL)
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index 77b507f..36c98a6 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -174,7 +174,7 @@ xlsx_write_shared_strings (XLSXWriteState *state, GsfOutfile *wb_part)
 
 		gsf_xml_out_start_element (xml, "sst");
 		gsf_xml_out_add_cstr_unchecked (xml, "xmlns", ns_ss);
-		gsf_xml_out_add_cstr_unchecked (xml, "xml:space", "preserve");
+		/* Note the schema does not allow the attribute xml:space */
 		gsf_xml_out_add_int (xml, "uniqueCount", state->shared_string_array->len);
 		gsf_xml_out_add_int (xml, "count", state->shared_string_array->len);
 
@@ -927,7 +927,7 @@ xlsx_write_styles (XLSXWriteState *state, GsfOutfile *wb_part)
 
 	gsf_xml_out_start_element (xml, "styleSheet");
 	gsf_xml_out_add_cstr_unchecked (xml, "xmlns", ns_ss);
-	gsf_xml_out_add_cstr_unchecked (xml, "xml:space", "preserve");
+	/* Note the schema does not allow the attribute xml:space */
 
 	/* The order of elements is fixed in the schema (xsd:sequence) */
 	num_format_hash = xlsx_write_num_formats (state, xml);
@@ -2018,7 +2018,7 @@ xlsx_write_workbook (XLSXWriteState *state, GsfOutfile *root_part)
 	gsf_xml_out_start_element (xml, "workbook");
 	gsf_xml_out_add_cstr_unchecked (xml, "xmlns", ns_ss);
 	gsf_xml_out_add_cstr_unchecked (xml, "xmlns:r", ns_rel);
-	gsf_xml_out_add_cstr_unchecked (xml, "xml:space", "preserve");
+	/* Note the schema does not allow the attribute xml:space */
 
 	gsf_xml_out_start_element (xml, "fileVersion");
 	gsf_xml_out_add_int (xml, "lastEdited", 4);



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