Commit e2b84d4e authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

reference v8, and make Max{Col,Row} optional.

2001-09-14  Jody Goldberg <jgoldberg@home.com>

	* gnumeric.xsd : reference v8, and make Max{Col,Row} optional.

	* src/xml-io.c : bump the name space version to reflect the schema
	  and move the location of the dtd and schema to somewhere we control.
	(xml_workbook_write) : reference the schema.
	(xml_sheet_write) : The name space is always available already.
parent 1e86dbcd
......@@ -14,8 +14,6 @@ Release Critical
Pending Patches
---------------
- xml schema
Long term breakage
------------------
......
2001-09-14 Jody Goldberg <jgoldberg@home.com>
* gnumeric.xsd : reference v8, and make Max{Col,Row} optional.
* src/xml-io.c : bump the name space version to reflect the schema
and move the location of the dtd and schema to somewhere we control.
(xml_workbook_write) : reference the schema.
(xml_sheet_write) : The name space is always available already.
2001-09-14 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (workbook_create_standard_toolbar) : Use
......
......@@ -11,6 +11,9 @@ Andreas:
Christopher Keith Fairbairn:
* Add a 'Fill' menu connection to autofill.
Eric Baudais:
* Improve function documentation generator.
Jody:
* Enable XL import for graphs.
* Parse using the assigned fmt before checking the builtins.
......
2001-09-14 Jody Goldberg <jgoldberg@home.com>
* gnumeric.xsd : reference v8, and make Max{Col,Row} optional.
* src/xml-io.c : bump the name space version to reflect the schema
and move the location of the dtd and schema to somewhere we control.
(xml_workbook_write) : reference the schema.
(xml_sheet_write) : The name space is always available already.
2001-09-14 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (workbook_create_standard_toolbar) : Use
......
2001-09-14 Jody Goldberg <jgoldberg@home.com>
* gnumeric.xsd : reference v8, and make Max{Col,Row} optional.
* src/xml-io.c : bump the name space version to reflect the schema
and move the location of the dtd and schema to somewhere we control.
(xml_workbook_write) : reference the schema.
(xml_sheet_write) : The name space is always available already.
2001-09-14 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (workbook_create_standard_toolbar) : Use
......
2001-09-14 Jody Goldberg <jgoldberg@home.com>
* gnumeric.xsd : reference v8, and make Max{Col,Row} optional.
* src/xml-io.c : bump the name space version to reflect the schema
and move the location of the dtd and schema to somewhere we control.
(xml_workbook_write) : reference the schema.
(xml_sheet_write) : The name space is always available already.
2001-09-14 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (workbook_create_standard_toolbar) : Use
......
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:gmr="http://www.gnome.org/gnumeric/v7"
targetNamespace="http://www.gnome.org/gnumeric/v7"
xmlns:gmr="http://www.gnumeric.org/v8.dtd"
targetNamespace="http://www.gnumeric.org/v8.dyd"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
......@@ -43,7 +43,7 @@
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<!-- version number should be v7 - - &gt;
<!-- version number should be v8 - - &gt;
<xsd:attribute name="gmr" type="gmr:namespace" use="required"/> -->
</xsd:complexType>
<!--
......@@ -139,9 +139,9 @@
<!-- name of the sheet -->
<xsd:element name="Name" type="xsd:string"/>
<!-- maximum column used -->
<xsd:element name="MaxCol" type="xsd:positiveInteger"/>
<xsd:element name="MaxCol" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1"/>
<!-- maximum row used -->
<xsd:element name="MaxRow" type="xsd:positiveInteger"/>
<xsd:element name="MaxRow" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1"/>
<!-- most recently used zoom factor -->
<xsd:element name="Zoom" type="xsd:double"/>
<xsd:element ref="gmr:Names" minOccurs="0" maxOccurs="unbounded"/>
......
......@@ -415,9 +415,10 @@ typedef enum
GNUM_XML_V5, /* >= 0.58 */
GNUM_XML_V6, /* >= 0.62 */
GNUM_XML_V7, /* >= 0.66 */
GNUM_XML_V8, /* >= 0.68 */
/* NOTE : Keep this up to date */
GNUM_XML_LATEST = GNUM_XML_V7
GNUM_XML_LATEST = GNUM_XML_V8
} GnumericXMLVersion;
typedef struct _XMLSaxParseState
{
......@@ -524,6 +525,7 @@ xml_sax_wb (XMLSaxParseState *state, CHAR const **attrs)
char const * const id;
GnumericXMLVersion const version;
} GnumericVersions [] = {
{ "http://www.gnumeric.org/v8.dtd", GNUM_XML_V8 }, /* 0.71 */
{ "http://www.gnome.org/gnumeric/v7", GNUM_XML_V7 }, /* 0.66 */
{ "http://www.gnome.org/gnumeric/v6", GNUM_XML_V6 }, /* 0.62 */
{ "http://www.gnome.org/gnumeric/v5", GNUM_XML_V5 },
......
......@@ -2153,7 +2153,6 @@ static xmlNodePtr
xml_sheet_write (XmlParseContext *ctxt, Sheet const *sheet)
{
xmlNodePtr cur;
xmlNsPtr gmr;
xmlNodePtr child;
xmlNodePtr rows;
xmlNodePtr cols;
......@@ -2163,18 +2162,10 @@ xml_sheet_write (XmlParseContext *ctxt, Sheet const *sheet)
xmlNodePtr solver;
char *tstr;
/*
* General informations about the Sheet.
*/
/* General information about the Sheet */
cur = xmlNewDocNode (ctxt->doc, ctxt->ns, "Sheet", NULL);
if (cur == NULL)
return NULL;
if (ctxt->ns == NULL) {
gmr = xmlNewNs (cur, "http://www.gnome.org/gnumeric/", "gmr");
xmlSetNs (cur, gmr);
ctxt->ns = gmr;
}
e_xml_set_bool_prop_by_name (cur, "DisplayFormulas",
sheet->display_formulas);
e_xml_set_bool_prop_by_name (cur, "HideZero",
......@@ -2720,6 +2711,7 @@ static const struct {
char const * const id;
GnumericXMLVersion const version;
} GnumericVersions [] = {
{ "http://www.gnumeric.org/v8.dtd", GNUM_XML_V8 }, /* 0.71 */
{ "http://www.gnome.org/gnumeric/v7", GNUM_XML_V7 }, /* 0.66 */
{ "http://www.gnome.org/gnumeric/v6", GNUM_XML_V6 }, /* 0.62 */
{ "http://www.gnome.org/gnumeric/v5", GNUM_XML_V5 },
......@@ -2757,7 +2749,6 @@ xmlNodePtr
xml_workbook_write (XmlParseContext *ctxt, WorkbookView *wb_view)
{
xmlNodePtr cur;
xmlNsPtr gmr;
xmlNodePtr child;
GtkArg *args;
guint n_args;
......@@ -2776,9 +2767,13 @@ xml_workbook_write (XmlParseContext *ctxt, WorkbookView *wb_view)
* the most recent version, see table above. Keep the table
* ordered this way!
*/
gmr = xmlNewNs (cur, GnumericVersions[0].id, "gmr");
xmlSetNs(cur, gmr);
ctxt->ns = gmr;
ctxt->ns = xmlNewNs (cur, GnumericVersions[0].id, "gmr");
xmlSetNs(cur, ctxt->ns);
xmlNewNsProp (cur,
xmlNewNs (cur, "http://www.w3.org/2001/XMLSchema-instance", "xsi"),
"schemaLocation",
"http://www.gnumeric.org/v8.xsd");
}
old_num_locale = g_strdup (gnumeric_setlocale (LC_NUMERIC, NULL));
......
......@@ -27,9 +27,10 @@ typedef enum
GNUM_XML_V5, /* >= 0.58 */
GNUM_XML_V6, /* >= 0.62 */
GNUM_XML_V7, /* >= 0.66 */
GNUM_XML_V8, /* >= 0.71 */
/* NOTE : Keep this up to date */
GNUM_XML_LATEST = GNUM_XML_V7
/* NOTE : Keep this up to date (and in sync with the schema) */
GNUM_XML_LATEST = GNUM_XML_V8
} GnumericXMLVersion;
typedef struct _XmlParseContext XmlParseContext;
......
......@@ -415,9 +415,10 @@ typedef enum
GNUM_XML_V5, /* >= 0.58 */
GNUM_XML_V6, /* >= 0.62 */
GNUM_XML_V7, /* >= 0.66 */
GNUM_XML_V8, /* >= 0.68 */
/* NOTE : Keep this up to date */
GNUM_XML_LATEST = GNUM_XML_V7
GNUM_XML_LATEST = GNUM_XML_V8
} GnumericXMLVersion;
typedef struct _XMLSaxParseState
{
......@@ -524,6 +525,7 @@ xml_sax_wb (XMLSaxParseState *state, CHAR const **attrs)
char const * const id;
GnumericXMLVersion const version;
} GnumericVersions [] = {
{ "http://www.gnumeric.org/v8.dtd", GNUM_XML_V8 }, /* 0.71 */
{ "http://www.gnome.org/gnumeric/v7", GNUM_XML_V7 }, /* 0.66 */
{ "http://www.gnome.org/gnumeric/v6", GNUM_XML_V6 }, /* 0.62 */
{ "http://www.gnome.org/gnumeric/v5", GNUM_XML_V5 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment