[Python-modules-commits] [python-odf] 41/118: Updated to ODF 1.1

Wolfgang Borgert debacle at moszumanska.debian.org
Fri Oct 3 21:27:20 UTC 2014


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to reference refs/remotes/upstream/master
in repository python-odf.

commit 939796c3b85548dbe4399d6dde9eaf35c588408c
Author: Søren Roug <soren.roug at eea.europa.eu>
Date:   Sat Mar 7 17:42:03 2009 +0000

    Updated to ODF 1.1
---
 api-for-odfpy.odt             | Bin 72158 -> 73099 bytes
 contrib/html2odt/shtml2odt.py | 217 ++++++++++++++++++++++--------
 grammar/gen_allowed_attrs.py  |   3 +-
 grammar/test_grammar.py       |   6 +-
 odf/elementtypes.py           |   5 -
 odf/grammar.py                | 305 +++++++++++++++++++++++++++++++-----------
 odf/office.py                 |  10 +-
 7 files changed, 398 insertions(+), 148 deletions(-)

diff --git a/api-for-odfpy.odt b/api-for-odfpy.odt
index b9700d2..85b42c9 100644
Binary files a/api-for-odfpy.odt and b/api-for-odfpy.odt differ
diff --git a/contrib/html2odt/shtml2odt.py b/contrib/html2odt/shtml2odt.py
index 4cb1adf..d71fbfc 100644
--- a/contrib/html2odt/shtml2odt.py
+++ b/contrib/html2odt/shtml2odt.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
-# Copyright (C) 2008 Søren Roug, European Environment Agency
+# Copyright (C) 2008-2009 Søren Roug, European Environment Agency
 #
 # This is free software.  You may redistribute it under the terms
 # of the Apache license and the GNU General Public License Version
@@ -18,29 +18,26 @@
 # Contributor(s):
 #
 #
-import string, sys, re
+import string, sys, re, getopt
 import urllib2, htmlentitydefs, urlparse
 from urllib import quote_plus
 from HTMLParser import HTMLParser
 from cgi import escape,parse_header
 from types import StringType
 
-from odf.opendocument import OpenDocumentText
+from odf.opendocument import OpenDocumentText, load
 from odf import dc, text, table
 import htmlstyles
 
 
-def checkurl(url, http_proxy=None):
+def converturl(url, document=None):
     """ grab and convert url
     """
     url = string.strip(url)
 #   if url.lower()[:5] != "http:":
 #       raise IOError, "Only http is accepted"
 
-    if http_proxy:
-        _proxies = { 'http': http_proxy }
-    else:
-        _proxies = {}
+    _proxies = {}
     proxy_support = urllib2.ProxyHandler(_proxies)
     opener = urllib2.build_opener(proxy_support, urllib2.HTTPHandler)
 
@@ -62,8 +59,7 @@ def checkurl(url, http_proxy=None):
         if parms.has_key('charset'):
             encoding = parms['charset']
 
-    mhp = HTML2ODTParser(encoding, url)
-    failure = ""
+    mhp = HTML2ODTParser(document, encoding, url)
     mhp.feed(data)
     return  mhp
 
@@ -87,11 +83,32 @@ class TagObject:
 
 class HTML2ODTParser(HTMLParser):
 
-    def __init__(self, encoding, baseurl):
+    def __init__(self, document, encoding, baseurl):
         HTMLParser.__init__(self)
-        self.doc = OpenDocumentText()
+        self.doc = document
         self.curr = self.doc.text
-        htmlstyles.addStandardStyles(self.doc)
+        if self.doc.getStyleByName("Standard") is None:
+            style = Style(name="Standard", family="paragraph", attributes={'class':"text"})
+            self.doc.styles.addElement(style)
+
+        if self.doc.getStyleByName("Text_20_body") is None:
+            style = Style(name="Text_20_body", displayname="Text body", family="paragraph",
+               parentstylename="Standard", attributes={'class':"text"})
+            p = ParagraphProperties(margintop="0cm", marginbottom="0.212cm")
+            style.addElement(p)
+            self.doc.styles.addElement(style)
+
+        if self.doc.getStyleByName("Heading") is None:
+            style = Style(name="Heading", family="paragraph", parentstylename="Standard",
+                nextstylename="Text_20_body", attributes={'class':"text"})
+            p = ParagraphProperties(margintop="0.423cm", marginbottom="0.212cm", keepwithnext="always")
+            style.addElement(p)
+            p = TextProperties(fontname="Nimbus Sans L", fontsize="14pt",
+                 fontnameasian="DejaVu LGC Sans", fontsizeasian="14pt",
+                 fontnamecomplex="DejaVu LGC Sans", fontsizecomplex="14pt")
+            style.addElement(p)
+            self.doc.styles.addElement(style)
+
         self.encoding = encoding
         (scheme, host, path, params, fragment) = urlparse.urlsplit(baseurl)
         lastslash = path.rfind('/')
@@ -108,7 +125,8 @@ class HTML2ODTParser(HTMLParser):
         self.elements = {
      'a':    (self.s_html_a, self.close_tag),
      'base': ( self.output_base, None),
-     'b':    ( self.s_html_emphasis, self.close_tag),
+     'b':    ( self.s_html_fontstyle, self.close_tag),
+     'big':  ( self.s_html_fontstyle, self.close_tag),
      'br':   ( self.output_br, None),
      'col':  ( self.s_html_col, None),
      'dd':   ( self.s_html_dd, self.close_tag),
@@ -122,27 +140,28 @@ class HTML2ODTParser(HTMLParser):
      'h5':   ( self.s_html_headline, self.close_tag),
      'h6':   ( self.s_html_headline, self.close_tag),
      'head': ( self.s_ignorexml, None),
-     'i':    ( self.s_html_emphasis, self.close_tag),
+     'i':    ( self.s_html_fontstyle, self.close_tag),
      'img':  ( self.output_img, None),
      'li':   ( self.s_html_li, self.e_html_li),
      'meta': ( self.meta_encoding, None),
      'ol':   ( self.output_ol, self.e_html_list),
      'p':    ( self.s_html_block, self.e_html_block),
+     's':    ( self.s_html_fontstyle, self.close_tag),
+     'small':( self.s_html_fontstyle, self.close_tag),
      'span': ( self.s_html_span, self.close_tag),
+     'strike':( self.s_html_fontstyle, self.close_tag),
      'strong':( self.s_html_emphasis, self.close_tag),
      'table':( self.s_html_table, self.e_html_table),
      'td':   ( self.s_html_td, self.close_tag),
      'th':   ( self.s_html_td, self.close_tag),
      'title':( self.s_html_title, self.e_html_title),
      'tr':   ( self.s_html_tr, self.close_tag),
+     'tt':   ( self.s_html_fontstyle, self.close_tag),
+     'u':    ( self.s_html_fontstyle, self.close_tag),
      'ul':   ( self.output_ul, self.e_html_list),
      'var':  ( self.s_html_emphasis, self.close_tag),
-     'input':( self.output_input, None),
-     'select':( self.output_select, None),
-     'textarea':( self.output_textarea, None),
     }
 
-
     def result(self):
         """ Return a string
             String must be in UNICODE
@@ -206,17 +225,67 @@ class HTML2ODTParser(HTMLParser):
     def output_br(self, tag, attrs):
         self.curr.addElement(text.LineBreak())
 
+    def s_html_font(self, tag, attrs):
+        """ 15.2.1 Font style elements: the TT, I, B, BIG, SMALL,
+            STRIKE, S, and U elements
+        """
+        tagdict = {
+        }
+
     def s_html_emphasis(self, tag, attrs):
+        """ 9.2.1 Phrase elements: EM, STRONG, DFN, CODE, SAMP, KBD,
+            VAR, CITE, ABBR, and ACRONYM
+        """
+        tagdict = {
+           'cite':      ['Citation', {'fontstyle':"italic", 'fontstyleasian':"italic", 'fontstylecomplex':"italic" }],
+           'code':      ['Source_20_Text', {'fontname':"Courier", 'fontnameasian':"Courier",'fontnamecomplex':"Courier" }],
+           'dfn':      ['Definition',{ }],
+           'em':      ['Emphasis', {'fontstyle':"italic", 'fontstyleasian':"italic", 'fontstylecomplex':"italic" }],
+           'strong':   ['Strong_20_Emphasis': {'fontweight':"bold",'fontweightasian':"bold",'fontweightcomplex':"bold"}],
+           'var':      ['Variable', {'fontstyle':"italic", 'fontstyleasian':"italic", 'fontstylecomplex':"italic" }],
+           }
+        stylename = tagdict.get(tag,'Emphasis')
+        # Add the styles we need to the stylesheet
+        if stylename == "Source_20_Text" and self.doc.getStyleByName(stylename) is None:
+            style = Style(name="Source_20_Text", displayname="Source Text", family="text")
+            p = TextProperties(fontname="Courier", fontnameasian="Courier", fontnamecomplex="Courier")
+            style.addElement(p)
+            self.doc.styles.addElement(style)
+
+        e = text.Span(stylename=stylename)
+        self.curr.addElement(e)
+        self.curr = e
+
+    def s_html_fontstyle(self, tag, attrs):
+        """ 15.2.1 Font style elements: the TT, I, B, BIG, SMALL,
+            STRIKE, S, and U elements
+            ('tt' is not considered an automatic style by OOo)
+        """
         tagdict = {
-           'b': 'Bold',
-           'em':'Emphasis',
-           'i':'Italic',
-           'strong': 'Strong_20_Emphasis',
-           'var':'Variable'}
-        e = text.Span(stylename=tagdict.get(tag,'Emphasis'))
+           'b':      ['BoldX',{'fontweight':"bold",
+                      'fontweightasian':"bold",'fontweightcomplex':"bold" }],
+           'big':    ['BigX', {'fontsize':"120%"}],
+           'i':      ['ItalicX', {'fontstyle':"italic", 'fontstyleasian':"italic", 'fontstylecomplex':"italic" }],
+           'tt':     ['TeletypeX', {'fontname':"Courier", 'fontnameasian':"Courier", 'fontnamecomplex':"Courier" }],
+           's':      ['StrikeX', {'textlinethroughstyle':"solid"}],
+           'small':  ['SmallX', {'fontsize':"80%"}],
+           'strike': ['StrikeX', {'textlinethroughstyle':"solid"}],
+           'u':      ['UnderlineX', {'textunderlinestyle':"solid", 'textunderlinewidth':"auto",
+                      'textunderlinecolor':"fontcolor"}],
+        }
+        stylename,styledecl = tagdict.get(tag,[None,None])
+        if stylename and self.doc.getStyleByName(stylename) is None:
+            style = Style(name=stylename, family="text")
+            style.addElement(TextProperties(attributes=styledecl))
+            self.doc.automaticstyles.addElement(style)
+        if stylename:
+            e = text.Span(stylename=stylename)
+        else:
+            e = text.Span()
         self.curr.addElement(e)
         self.curr = e
 
+
     def s_html_span(self, tag, attrs):
         e = text.Span()
         self.curr.addElement(e)
@@ -260,12 +329,26 @@ class HTML2ODTParser(HTMLParser):
         self.curr = self.curr.parentNode
 
     def s_html_dd(self, tag, attrs):
+        if self.doc.getStyleByName("List_20_Contents") is None:
+            style = Style(name="List_20_Contents", displayname="List Contents", family="paragraph",
+                 parentstylename="Standard", attributes={'class':"html"})
+            p = ParagraphProperties(marginleft="1cm", marginright="0cm", textindent="0cm", autotextindent="false")
+            style.addElement(p)
+            self.doc.styles.addElement(style)
         e = text.P(stylename="List_20_Contents")
         self.curr.addElement(e)
         self.curr = e
 
     def s_html_dt(self, tag, attrs):
-        self.write_odt(u'<text:p text:style-name="List_20_Heading">')
+        if self.doc.getStyleByName("List_20_Heading") is None:
+            style = Style(name="List_20_Heading", displayname="List Heading", family="paragraph", parentstylename="Standard",
+                 nextstylename="List_20_Contents", attributes={'class':"html"})
+            p = ParagraphProperties(marginleft="0cm", marginright="0cm", textindent="0cm", autotextindent="false")
+            style.addElement(p)
+            self.doc.styles.addElement(style)
+        e = text.P(stylename="List_20_Heading")
+        self.curr.addElement(e)
+        self.curr = e
 
     def output_ul(self, tag, attrs):
         self.write_odt(u'<text:list text:style-name="List_20_1">')
@@ -282,35 +365,36 @@ class HTML2ODTParser(HTMLParser):
     def e_html_li(self, tag):
         self.write_odt(u'</text:p></text:list-item>')
 
-    def output_select(self, tag, attrs):
-        return
-        self.write_odt(u'<br/>Combo box:')
-
-    def output_textarea(self, tag, attrs):
-        return
-        self.write_odt(u'<form:textarea>')
-
-    def output_input(self, tag, attrs):
-        return
-        type = listget(attrs, 'type', "text")
-        value = listget(attrs, 'value', "")
-        if type == "text":
-            self.write_odt(u'<br/>Edit:')
-        elif type == "submit":
-            self.write_odt(u' %s' % value)
-        elif type == "checkbox":
-            #FIXME - Only works in XHTML
-            checked = listget(attrs, 'checked', "not checked")
-            self.write_odt(u'<br/>Checkbox:' % checked)
-        elif type == "radio":
-            checked = listget(attrs, 'checked', "not checked")
-            self.write_odt(u'<br/>Radio button:' % checked)
-        elif type == "file":
-            self.write_odt(u'File upload edit %s' % value)
-            self.write_odt(u'<br/>Browse button:')
-
     def s_html_headline(self, tag, attrs):
-        self.write_odt(u'<text:h text:style-name="Heading_20_%s" text:outline-level="%s">' % (tag[1],tag[1]))
+        stylename = "Heading_20_%s" % tag[1]
+        if stylename == "Heading_20_1" and self.doc.getStyleByName("Heading_20_1") is None:
+            style = Style(name="Heading_20_1", displayname="Heading 1",
+                 family="paragraph", parentstylename="Heading", nextstylename="Text_20_body",
+                 attributes={'class':"text"}, defaultoutlinelevel=1)
+            p = TextProperties(fontsize="115%", fontweight="bold", fontsizeasian="115%",
+                 fontweightasian="bold", fontsizecomplex="115%", fontweightcomplex="bold")
+            style.addElement(p)
+            self.doc.styles.addElement(style)
+
+        if stylename == "Heading_20_2" and self.doc.getStyleByName("Heading_20_2") is None:
+            style = Style(name="Heading_20_2", displayname="Heading 2",
+                 family="paragraph", parentstylename="Heading", nextstylename="Text_20_body",
+                 attributes={'class':"text"}, defaultoutlinelevel=2)
+            p = TextProperties(fontsize="14pt", fontstyle="italic", fontweight="bold",
+                 fontsizeasian="14pt", fontstyleasian="italic", fontweightasian="bold",
+                 fontsizecomplex="14pt", fontstylecomplex="italic", fontweightcomplex="bold")
+            style.addElement(p)
+            self.doc.styles.addElement(style)
+
+        if stylename == "Heading_20_3" and self.doc.getStyleByName("Heading_20_3") is None:
+            style = Style(name="Heading_20_3", displayname="Heading 3",
+                 family="paragraph", parentstylename="Heading", nextstylename="Text_20_body",
+                 attributes={'class':"text"}, defaultoutlinelevel=3)
+            p = TextProperties(fontsize="14pt", fontweight="bold", fontsizeasian="14pt",
+                 fontweightasian="bold", fontsizecomplex="14pt", fontweightcomplex="bold")
+            style.addElement(p)
+            self.doc.styles.addElement(style)
+
         e = text.H(stylename="Heading_20_%s" % tag[1], outlinelevel=tag[1])
         self.curr.addElement(e)
         self.curr = e
@@ -507,10 +591,29 @@ class HTML2ODTParser(HTMLParser):
             self.handle_data(attrval[i:n])
             i = n
 
+def usage():
+   sys.stderr.write("Usage: %s [-a] inputurl outputfile\n" % sys.argv[0])
+
 if __name__ == "__main__":
-    import sys
-    result = checkurl(sys.argv[1])
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], "a", ["append"])
+
+    except getopt.GetoptError:
+        usage()
+        sys.exit(2)
+
+    appendto = False
+    for o, a in opts:
+        if o in ("-a", "--append"):
+            appendto = True
+
+    if appendto:
+        doc = load(args[1])
+    else:
+        doc = OpenDocumentText()
+
+    result = converturl(args[0], doc)
     print result.doc.xml()
-    result.doc.save("helloworld", True)
+    result.doc.save(args[1])
 
 
diff --git a/grammar/gen_allowed_attrs.py b/grammar/gen_allowed_attrs.py
index bbf0471..49467ea 100755
--- a/grammar/gen_allowed_attrs.py
+++ b/grammar/gen_allowed_attrs.py
@@ -75,7 +75,8 @@ class S22RelaxParser(handler.ContentHandler):
             currnode = None
         elif tag == (RELAXNS, 'name'):
             currnode.name = self.text()
-            currelement.attrs[(currnode.ns, currnode.name)] = currnode
+            if currnode != currelement:
+                currelement.attrs[(currnode.ns, currnode.name)] = currnode
         elif tag == (RELAXNS, 'anyName'):
             currnode.name = "__ANYNAME__"
         self.data = []
diff --git a/grammar/test_grammar.py b/grammar/test_grammar.py
index 6e150f9..3b4caa8 100644
--- a/grammar/test_grammar.py
+++ b/grammar/test_grammar.py
@@ -42,7 +42,7 @@ class TestAllowedAtts(unittest.TestCase):
                     assert attr in insatts, "Attribute %s:%s not in installed grammar for %s:%s" % (attr + element)
 
     def testAllowedAtts(self):
-        "Testing grammar keys"
+        "Testing allowed attributes in grammar"
         for element, atts in grammar.allowed_attributes.items():
             assert element in grammarnew.allowed_attributes, "%s:%s not in new grammar" % element
             newatts = grammarnew.allowed_attributes[element]
@@ -71,7 +71,7 @@ class TestRequiredAtts(unittest.TestCase):
 
 class TestAllowedChildren(unittest.TestCase):
     def testAllowedChildrenNew(self):
-        "Testing grammarnew keys"
+        "Testing allowed children in grammarnew"
         for element,atts in grammarnew.allowed_children.items():
             assert element in grammar.allowed_children, "%s:%s not in installed grammar" % element
             insatts = grammar.allowed_children[element]
@@ -82,7 +82,7 @@ class TestAllowedChildren(unittest.TestCase):
                     assert attr in insatts, "Element %s:%s not in installed grammar for %s:%s" % (attr + element)
 
     def testAllowedChildren(self):
-        "Testing grammar keys"
+        "Testing allowed children in grammar"
         for element, atts in grammar.allowed_children.items():
             assert element in grammarnew.allowed_children, "%s:%s not in new grammar" % element
             newatts = grammarnew.allowed_children[element]
diff --git a/odf/elementtypes.py b/odf/elementtypes.py
index 4663b1e..7c19412 100644
--- a/odf/elementtypes.py
+++ b/odf/elementtypes.py
@@ -109,11 +109,6 @@ inline_elements = (
 )
 
 
-struct_elements = (
-	(CONFIGNS,'config-item-set'),
-	(TABLENS,u'table-cell'),
-)
-
 # It is almost impossible to determine what elements are block elements.
 # There are so many that don't fit the form
 block_elements = (
diff --git a/odf/grammar.py b/odf/grammar.py
index c4a70ad..2b5b366 100644
--- a/odf/grammar.py
+++ b/odf/grammar.py
@@ -366,6 +366,8 @@ allowed_children = {
 		(DR3DNS,u'rotate'),
 		(DR3DNS,u'scene'),
 		(DR3DNS,u'sphere'),
+		(SVGNS,u'title'),
+		(SVGNS,u'desc'),
 	),
 	(DR3DNS,u'sphere') : (
 	),
@@ -379,24 +381,31 @@ allowed_children = {
 	(DRAWNS,u'area-circle') : (
 		(OFFICENS,u'event-listeners'),
 		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 	),
 	(DRAWNS,u'area-polygon') : (
 		(OFFICENS,u'event-listeners'),
 		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 	),
 	(DRAWNS,u'area-rectangle') : (
 		(OFFICENS,u'event-listeners'),
 		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 	),
 	(DRAWNS,u'caption') : (
 		(DRAWNS,u'glue-point'),
 		(OFFICENS,u'event-listeners'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
 	),
 	(DRAWNS,u'circle') : (
 		(DRAWNS,u'glue-point'),
 		(OFFICENS,u'event-listeners'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
 	),
@@ -404,6 +413,8 @@ allowed_children = {
 	(DRAWNS,u'connector') : (
 		(DRAWNS,u'glue-point'),
 		(OFFICENS,u'event-listeners'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
 	),
@@ -413,17 +424,23 @@ allowed_children = {
 	),
 	(DRAWNS,u'control') : (
 		(DRAWNS,u'glue-point'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 	),
 	(DRAWNS,u'custom-shape') : (
 		(DRAWNS,u'enhanced-geometry'),
 		(DRAWNS,u'glue-point'),
 		(OFFICENS,u'event-listeners'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
 	),
 	(DRAWNS,u'ellipse') : (
 		(DRAWNS,u'glue-point'),
 		(OFFICENS,u'event-listeners'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
 	),
@@ -451,6 +468,7 @@ allowed_children = {
 		(DRAWNS,u'text-box'),
 		(OFFICENS,u'event-listeners'),
 		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 	),
 	(DRAWNS,u'g') : (
 		(DR3DNS,u'scene'),
@@ -471,6 +489,8 @@ allowed_children = {
 		(DRAWNS,u'polyline'),
 		(DRAWNS,u'rect'),
 		(DRAWNS,u'regular-polygon'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 		(OFFICENS,u'event-listeners'),
 	),
 	(DRAWNS,u'glue-point') : (
@@ -493,6 +513,8 @@ allowed_children = {
 		(DRAWNS,u'area-rectangle'),
 	),
 	(DRAWNS,u'layer') : (
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 	),
 	(DRAWNS,u'layer-set') : (
 		(DRAWNS,u'layer'),
@@ -500,6 +522,8 @@ allowed_children = {
 	(DRAWNS,u'line') : (
 		(DRAWNS,u'glue-point'),
 		(OFFICENS,u'event-listeners'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
 	),
@@ -510,6 +534,8 @@ allowed_children = {
 		(OFFICENS,u'event-listeners'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
+		(SVGNS,u'title'),
+		(SVGNS,u'desc'),
 	),
 	(DRAWNS,u'object') : (
 		(MATHNS,u'math'),
@@ -554,12 +580,16 @@ allowed_children = {
 		(PRESENTATIONNS,u'notes'),
 	),
 	(DRAWNS,u'page-thumbnail') : (
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 	),
 	(DRAWNS,u'param') : (
 	),
 	(DRAWNS,u'path') : (
 		(DRAWNS,u'glue-point'),
 		(OFFICENS,u'event-listeners'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
 	),
@@ -569,24 +599,32 @@ allowed_children = {
 	(DRAWNS,u'polygon') : (
 		(DRAWNS,u'glue-point'),
 		(OFFICENS,u'event-listeners'),
+		(SVGNS,u'title'),
+		(SVGNS,u'desc'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
 	),
 	(DRAWNS,u'polyline') : (
 		(DRAWNS,u'glue-point'),
 		(OFFICENS,u'event-listeners'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
 	),
 	(DRAWNS,u'rect') : (
 		(DRAWNS,u'glue-point'),
 		(OFFICENS,u'event-listeners'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
 	),
 	(DRAWNS,u'regular-polygon') : (
 		(DRAWNS,u'glue-point'),
 		(OFFICENS,u'event-listeners'),
+		(SVGNS,u'desc'),
+		(SVGNS,u'title'),
 		(TEXTNS,u'list'),
 		(TEXTNS,u'p'),
 	),
@@ -1141,6 +1179,7 @@ allowed_children = {
 		(DRAWNS,u'polyline'),
 		(DRAWNS,u'rect'),
 		(DRAWNS,u'regular-polygon'),
+		(OFFICENS,u'forms'),
 	),
 	(PRESENTATIONNS,u'placeholder') : (
 	),
@@ -1219,6 +1258,7 @@ allowed_children = {
 		(TEXTNS,u'sequence-decls'),
 		(TEXTNS,u'table-index'),
 		(TEXTNS,u'table-of-content'),
+		(TEXTNS,u'tracked-changes'),
 		(TEXTNS,u'user-field-decls'),
 		(TEXTNS,u'user-index'),
 		(TEXTNS,u'variable-decls'),
@@ -1245,6 +1285,7 @@ allowed_children = {
 		(TEXTNS,u'sequence-decls'),
 		(TEXTNS,u'table-index'),
 		(TEXTNS,u'table-of-content'),
+		(TEXTNS,u'tracked-changes'),
 		(TEXTNS,u'user-field-decls'),
 		(TEXTNS,u'user-index'),
 		(TEXTNS,u'variable-decls'),
@@ -1300,6 +1341,7 @@ allowed_children = {
 		(TEXTNS,u'sequence-decls'),
 		(TEXTNS,u'table-index'),
 		(TEXTNS,u'table-of-content'),
+		(TEXTNS,u'tracked-changes'),
 		(TEXTNS,u'user-field-decls'),
 		(TEXTNS,u'user-index'),
 		(TEXTNS,u'variable-decls'),
@@ -1330,6 +1372,7 @@ allowed_children = {
 		(TEXTNS,u'sequence-decls'),
 		(TEXTNS,u'table-index'),
 		(TEXTNS,u'table-of-content'),
+		(TEXTNS,u'tracked-changes'),
 		(TEXTNS,u'user-field-decls'),
 		(TEXTNS,u'user-index'),
 		(TEXTNS,u'variable-decls'),
@@ -1456,6 +1499,8 @@ allowed_children = {
 	),
 	(SVGNS,u'stop') : (
 	),
+	(SVGNS,u'title') : (
+	),
 	(TABLENS,u'body') : (
 	),
 	(TABLENS,u'calculation-settings') : (
@@ -1839,6 +1884,7 @@ allowed_children = {
 		(TABLENS,u'table-row'),
 		(TABLENS,u'table-row-group'),
 		(TABLENS,u'table-rows'),
+		(TEXTNS,u'soft-page-break'),
 	),
 	(TABLENS,u'table-rows') : (
 		(TABLENS,u'table-row'),
@@ -1972,6 +2018,7 @@ allowed_children = {
 		(TEXTNS,u'sequence'),
 		(TEXTNS,u'sequence-ref'),
 		(TEXTNS,u'sheet-name'),
+		(TEXTNS,u'soft-page-break'),
 		(TEXTNS,u'span'),
 		(TEXTNS,u'subject'),
 		(TEXTNS,u'tab'),
@@ -2392,6 +2439,7 @@ allowed_children = {
 		(TEXTNS,u'object-index'),
 		(TEXTNS,u'p'),
 		(TEXTNS,u'section'),
+		(TEXTNS,u'soft-page-break'),
 		(TEXTNS,u'table-index'),
 		(TEXTNS,u'table-of-content'),
 		(TEXTNS,u'user-index'),
@@ -2421,6 +2469,7 @@ allowed_children = {
 		(TEXTNS,u'list'),
 		(TEXTNS,u'number'),
 		(TEXTNS,u'p'),
+		(TEXTNS,u'soft-page-break'),
 	),
 	(TEXTNS,u'list-item') : (
 		(TEXTNS,u'h'),
@@ -2489,6 +2538,7 @@ allowed_children = {
 		(TEXTNS,u'object-index'),
 		(TEXTNS,u'p'),
 		(TEXTNS,u'section'),
+		(TEXTNS,u'soft-page-break'),
 		(TEXTNS,u'table-index'),
 		(TEXTNS,u'table-of-content'),
 		(TEXTNS,u'user-index'),
@@ -2805,6 +2855,7 @@ allowed_children = {
 		(TEXTNS,u'sequence'),
 		(TEXTNS,u'sequence-ref'),
 		(TEXTNS,u'sheet-name'),
+		(TEXTNS,u'soft-page-break'),
 		(TEXTNS,u'span'),
 		(TEXTNS,u'subject'),
 		(TEXTNS,u'tab'),
@@ -2866,6 +2917,7 @@ allowed_children = {
 		(TEXTNS,u'p'),
 		(TEXTNS,u'section'),
 		(TEXTNS,u'section-source'),
+		(TEXTNS,u'soft-page-break'),
 		(TEXTNS,u'table-index'),
 		(TEXTNS,u'table-of-content'),
 		(TEXTNS,u'user-index'),
@@ -2913,6 +2965,8 @@ allowed_children = {
 	),
 	(TEXTNS,u'sheet-name') : (
 	),
+	(TEXTNS,u'soft-page-break') : (
+	),
 	(TEXTNS,u'sort-key') : (
 	),
 	(TEXTNS,u'span') : (
@@ -3020,6 +3074,7 @@ allowed_children = {
 		(TEXTNS,u'sequence'),
 		(TEXTNS,u'sequence-ref'),
 		(TEXTNS,u'sheet-name'),
+		(TEXTNS,u'soft-page-break'),
 		(TEXTNS,u'span'),
 		(TEXTNS,u'subject'),
 		(TEXTNS,u'tab'),
@@ -3148,10 +3203,6 @@ allowed_children = {
 	),
 }
 
-struct_elements = (  # Unused?
-	(CONFIGNS,'config-item-set'),
-	(TABLENS,u'table-cell'),
-)
 #
 # List of elements that allows text nodes
 #
@@ -4161,89 +4212,131 @@ allowed_attributes = {
 	(MATHNS,u'math'): None,
 	(XFORMSNS,u'model'): None,
 	(ANIMNS,u'animate'):(
-		(SMILNS,u'from'),
+		(ANIMNS,u'formula'),
+		(ANIMNS,u'sub-item'),
+		(SMILNS,u'accelerate'),
+		(SMILNS,u'accumulate'),
+		(SMILNS,u'additive'),
+		(SMILNS,u'attributeName'),
+		(SMILNS,u'autoReverse'),
+		(SMILNS,u'begin'),
+		(SMILNS,u'by'),
 		(SMILNS,u'calcMode'),
+		(SMILNS,u'decelerate'),
+		(SMILNS,u'dur'),
+		(SMILNS,u'end'),
+		(SMILNS,u'fill'),
+		(SMILNS,u'fillDefault'),
+		(SMILNS,u'from'),
 		(SMILNS,u'keySplines'),
+		(SMILNS,u'keyTimes'),
 		(SMILNS,u'repeatCount'),
 		(SMILNS,u'repeatDur'),
-		(SMILNS,u'attributeName'),
+		(SMILNS,u'restart'),
+		(SMILNS,u'restartDefault'),
+		(SMILNS,u'targetElement'),
 		(SMILNS,u'to'),
-		(ANIMNS,u'sub-item'),
 		(SMILNS,u'values'),
-		(SMILNS,u'keyTimes'),
-		(SMILNS,u'additive'),
-		(ANIMNS,u'formula'),
-		(SMILNS,u'accumulate'),
-		(SMILNS,u'targetElement'),
-		(SMILNS,u'by'),
-		(SMILNS,u'fill'),
 	),
 	(ANIMNS,u'animateColor'):(
+		(ANIMNS,u'color-interpolation'),
+		(ANIMNS,u'color-interpolation-direction'),
+		(ANIMNS,u'formula'),
+		(ANIMNS,u'sub-item'),
+		(SMILNS,u'accelerate'),
+		(SMILNS,u'accumulate'),
 		(SMILNS,u'additive'),
+		(SMILNS,u'attributeName'),
+		(SMILNS,u'autoReverse'),
+		(SMILNS,u'begin'),
+		(SMILNS,u'by'),
 		(SMILNS,u'calcMode'),
+		(SMILNS,u'decelerate'),
+		(SMILNS,u'dur'),
+		(SMILNS,u'end'),
+		(SMILNS,u'fill'),
+		(SMILNS,u'fillDefault'),
 		(SMILNS,u'from'),
 		(SMILNS,u'keySplines'),
-		(SMILNS,u'attributeName'),
-		(ANIMNS,u'color-interpolation-direction'),
-		(SMILNS,u'to'),
-		(ANIMNS,u'sub-item'),
-		(SMILNS,u'targetElement'),
 		(SMILNS,u'keyTimes'),
-		(ANIMNS,u'formula'),
-		(SMILNS,u'accumulate'),
+		(SMILNS,u'repeatCount'),
+		(SMILNS,u'repeatDur'),
+		(SMILNS,u'restart'),
+		(SMILNS,u'restartDefault'),
+		(SMILNS,u'targetElement'),
+		(SMILNS,u'to'),
 		(SMILNS,u'values'),
-		(SMILNS,u'fill'),
-		(SMILNS,u'by'),
-		(ANIMNS,u'color-interpolation'),
 	),
 # allowed_attributes
 	(ANIMNS,u'animateMotion'):(
-		(SVGNS,u'origin'),
+		(ANIMNS,u'formula'),
+		(ANIMNS,u'sub-item'),
+		(SMILNS,u'accelerate'),
+		(SMILNS,u'accumulate'),
 		(SMILNS,u'additive'),
+		(SMILNS,u'attributeName'),
+		(SMILNS,u'autoReverse'),
+		(SMILNS,u'begin'),
+		(SMILNS,u'by'),
 		(SMILNS,u'calcMode'),
+		(SMILNS,u'decelerate'),
+		(SMILNS,u'dur'),
+		(SMILNS,u'end'),
+		(SMILNS,u'fill'),
+		(SMILNS,u'fillDefault'),
 		(SMILNS,u'from'),
-		(SMILNS,u'values'),
 		(SMILNS,u'keySplines'),
-		(SMILNS,u'attributeName'),
-		(SMILNS,u'to'),
-		(ANIMNS,u'sub-item'),
-		(SMILNS,u'targetElement'),
 		(SMILNS,u'keyTimes'),
-		(ANIMNS,u'formula'),
-		(SMILNS,u'accumulate'),
+		(SMILNS,u'repeatCount'),
+		(SMILNS,u'repeatDur'),
+		(SMILNS,u'restart'),
+		(SMILNS,u'restartDefault'),
+		(SMILNS,u'targetElement'),
+		(SMILNS,u'to'),
+		(SMILNS,u'values'),
+		(SVGNS,u'origin'),
 		(SVGNS,u'path'),
-		(SMILNS,u'by'),
-		(SMILNS,u'fill'),
 	),
 	(ANIMNS,u'animateTransform'):(
+		(ANIMNS,u'formula'),
+		(ANIMNS,u'sub-item'),
+		(SMILNS,u'accelerate'),
+		(SMILNS,u'accumulate'),
 		(SMILNS,u'additive'),
-		(SMILNS,u'from'),
 		(SMILNS,u'attributeName'),
-		(SMILNS,u'to'),
-		(ANIMNS,u'sub-item'),
+		(SMILNS,u'autoReverse'),
+		(SMILNS,u'begin'),
+		(SMILNS,u'by'),
+		(SMILNS,u'decelerate'),
+		(SMILNS,u'dur'),
+		(SMILNS,u'end'),
+		(SMILNS,u'fill'),
+		(SMILNS,u'fillDefault'),
+		(SMILNS,u'from'),
+		(SMILNS,u'repeatCount'),
+		(SMILNS,u'repeatDur'),
+		(SMILNS,u'restart'),
+		(SMILNS,u'restartDefault'),
 		(SMILNS,u'targetElement'),
-		(ANIMNS,u'formula'),
-		(SMILNS,u'accumulate'),
+		(SMILNS,u'to'),
 		(SMILNS,u'values'),
 		(SVGNS,u'type'),
-		(SMILNS,u'by'),
-		(SMILNS,u'fill'),
 	),
 	(ANIMNS,u'audio'):(
-		(PRESENTATIONNS,u'node-type'),
-		(SMILNS,u'begin'),
 		(ANIMNS,u'audio-level'),
+		(ANIMNS,u'id'),
 		(PRESENTATIONNS,u'group-id'),
-		(SMILNS,u'repeatDur'),
-		(SMILNS,u'repeatCount'),
+		(PRESENTATIONNS,u'master-element'),
+		(PRESENTATIONNS,u'node-type'),
 		(PRESENTATIONNS,u'preset-class'),
 		(PRESENTATIONNS,u'preset-id'),
-		(XLINKNS,u'href'),
 		(PRESENTATIONNS,u'preset-sub-type'),
-		(SMILNS,u'end'),
+		(SMILNS,u'begin'),
 		(SMILNS,u'dur'),
-		(ANIMNS,u'id'),
-		(PRESENTATIONNS,u'master-element'),
+		(SMILNS,u'end'),
+		(SMILNS,u'repeatCount'),
+		(SMILNS,u'repeatDur'),
+		(XLINKNS,u'href'),
 	),
 	(ANIMNS,u'command'):(
 		(PRESENTATIONNS,u'node-type'),
@@ -4260,29 +4353,30 @@ allowed_attributes = {
 		(PRESENTATIONNS,u'master-element'),
 	),
 	(ANIMNS,u'iterate'):(
-		(SMILNS,u'decelerate'),
-		(SMILNS,u'repeatDur'),
-		(ANIMNS,u'iterate-interval'),
-		(SMILNS,u'repeatCount'),
-		(SMILNS,u'accelerate'),
 		(ANIMNS,u'id'),
-		(SMILNS,u'fill'),
+		(ANIMNS,u'iterate-interval'),
 		(ANIMNS,u'iterate-type'),
-		(SMILNS,u'end'),
-		(SMILNS,u'endsync'),
-		(PRESENTATIONNS,u'preset-sub-type'),
-		(PRESENTATIONNS,u'preset-id'),
-		(SMILNS,u'restartDefault'),
+		(ANIMNS,u'sub-item'),
+		(PRESENTATIONNS,u'group-id'),
 		(PRESENTATIONNS,u'master-element'),
-		(SMILNS,u'begin'),
-		(PRESENTATIONNS,u'preset-class'),
-		(SMILNS,u'targetElement'),
-		(SMILNS,u'dur'),
-		(SMILNS,u'restart'),
 		(PRESENTATIONNS,u'node-type'),
-		(PRESENTATIONNS,u'group-id'),
+		(PRESENTATIONNS,u'preset-class'),
+		(PRESENTATIONNS,u'preset-id'),
+		(PRESENTATIONNS,u'preset-sub-type'),
+		(SMILNS,u'accelerate'),
 		(SMILNS,u'autoReverse'),
+		(SMILNS,u'begin'),
+		(SMILNS,u'decelerate'),
+		(SMILNS,u'dur'),
+		(SMILNS,u'end'),
+		(SMILNS,u'endsync'),
+		(SMILNS,u'fill'),
 		(SMILNS,u'fillDefault'),
+		(SMILNS,u'repeatCount'),
+		(SMILNS,u'repeatDur'),
+		(SMILNS,u'restart'),
+		(SMILNS,u'restartDefault'),
+		(SMILNS,u'targetElement'),
 	),
 	(ANIMNS,u'par'):(
 		(PRESENTATIONNS,u'node-type'),
@@ -4354,22 +4448,34 @@ allowed_attributes = {
 
 	),
 	(ANIMNS,u'transitionFilter'):(
-		(SMILNS,u'direction'),
-		(SMILNS,u'subtype'),
+		(ANIMNS,u'formula'),
+		(ANIMNS,u'sub-item'),
+		(SMILNS,u'accelerate'),
+		(SMILNS,u'accumulate'),
 		(SMILNS,u'additive'),
+		(SMILNS,u'autoReverse'),
+		(SMILNS,u'begin'),
+		(SMILNS,u'by'),
 		(SMILNS,u'calcMode'),
-		(SMILNS,u'from'),
+		(SMILNS,u'decelerate'),
+		(SMILNS,u'direction'),
+		(SMILNS,u'dur'),
+		(SMILNS,u'end'),
 		(SMILNS,u'fadeColor'),
-		(SMILNS,u'to'),
-		(ANIMNS,u'sub-item'),
-		(SMILNS,u'targetElement'),
+		(SMILNS,u'fill'),
+		(SMILNS,u'fillDefault'),
+		(SMILNS,u'from'),
 		(SMILNS,u'mode'),
-		(ANIMNS,u'formula'),
-		(SMILNS,u'accumulate'),
-		(SMILNS,u'values'),
+		(SMILNS,u'repeatCount'),
+		(SMILNS,u'repeatDur'),
+		(SMILNS,u'restart'),
+		(SMILNS,u'restartDefault'),
+		(SMILNS,u'subtype'),
+		(SMILNS,u'targetElement'),
+		(SMILNS,u'to'),
 		(SMILNS,u'type'),
-		(SMILNS,u'by'),
-		(SMILNS,u'fill'),
+		(SMILNS,u'values'),
+
 	),
 # allowed_attributes
 	(CHARTNS,u'axis'):(
@@ -4713,6 +4819,7 @@ allowed_attributes = {
 		(DR3DNS,u'vrp'),
 		(DR3DNS,u'vup'),
 		(DRAWNS,u'id'),
+                (DRAWNS,u'caption-id'),
 		(DRAWNS,u'layer'),
 		(DRAWNS,u'z-index'),
 		(DRAWNS,u'class-names'),
@@ -4744,6 +4851,7 @@ allowed_attributes = {
 	),
 	(DRAWNS,u'a'):(
 		(OFFICENS,u'name'),
+		(OFFICENS,u'title'),
 		(XLINKNS,u'show'),
 		(OFFICENS,u'target-frame-name'),
 		(XLINKNS,u'actuate'),
@@ -4801,6 +4909,7 @@ allowed_attributes = {
 	(DRAWNS,u'caption'):(
 		(TABLENS,u'table-background'),
 		(DRAWNS,u'layer'),
+                (DRAWNS,u'caption-id'),
 		(TABLENS,u'end-cell-address'),
 		(DRAWNS,u'name'),
 		(DRAWNS,u'text-style-name'),
@@ -4832,6 +4941,7 @@ allowed_attributes = {
 		(DRAWNS,u'start-angle'),
 		(DRAWNS,u'class-names'),
 		(DRAWNS,u'style-name'),
+                (DRAWNS,u'caption-id'),
 		(DRAWNS,u'text-style-name'),
 		(DRAWNS,u'transform'),
 		(DRAWNS,u'z-index'),
@@ -4866,6 +4976,7 @@ allowed_attributes = {
 		(DRAWNS,u'class-names'),
 		(DRAWNS,u'style-name'),
 		(PRESENTATIONNS,u'class-names'),
+                (DRAWNS,u'caption-id'),
 		(DRAWNS,u'type'),
 		(DRAWNS,u'start-shape'),
 		(DRAWNS,u'z-index'),
@@ -4896,6 +5007,7 @@ allowed_attributes = {
 	(DRAWNS,u'control'):(
 		(DRAWNS,u'control'),
 		(DRAWNS,u'layer'),
+                (DRAWNS,u'caption-id'),
 		(TABLENS,u'end-cell-address'),
 		(DRAWNS,u'name'),
 		(DRAWNS,u'text-style-name'),
@@ -4918,6 +5030,7 @@ allowed_attributes = {
 	),
 	(DRAWNS,u'custom-shape'):(
 		(DRAWNS,u'engine'),
+                (DRAWNS,u'caption-id'),
 		(DRAWNS,u'layer'),
 		(TABLENS,u'end-cell-address'),
 		(DRAWNS,u'name'),
@@ -4959,6 +5072,7 @@ allowed_attributes = {
 		(PRESENTATIONNS,u'class-names'),
 		(DRAWNS,u'end-angle'),
 		(DRAWNS,u'z-index'),
+                (DRAWNS,u'caption-id'),
 		(PRESENTATIONNS,u'style-name'),
 		(SVGNS,u'height'),
 		(TEXTNS,u'anchor-type'),
@@ -5042,6 +5156,7 @@ allowed_attributes = {
 		(DRAWNS,u'layer'),
 		(DRAWNS,u'name'),
 		(DRAWNS,u'class-names'),
+                (DRAWNS,u'caption-id'),
 		(DRAWNS,u'style-name'),
 		(DRAWNS,u'text-style-name'),
 		(DRAWNS,u'transform'),
@@ -5066,6 +5181,7 @@ allowed_attributes = {
 	),
 	(DRAWNS,u'g'):(
 		(DRAWNS,u'id'),
+                (DRAWNS,u'caption-id'),
 		(DRAWNS,u'name'),
 		(DRAWNS,u'class-names'),
 		(DRAWNS,u'style-name'),
@@ -5139,6 +5255,7 @@ allowed_attributes = {
 	(DRAWNS,u'line'):(
 		(DRAWNS,u'class-names'),
 		(DRAWNS,u'id'),
+                (DRAWNS,u'caption-id'),
 		(DRAWNS,u'layer'),
 		(DRAWNS,u'name'),
 		(DRAWNS,u'style-name'),
@@ -5182,6 +5299,7 @@ allowed_attributes = {
 		(TABLENS,u'end-x'),
 		(TEXTNS,u'anchor-page-number'),
 		(SVGNS,u'y1'),
+                (DRAWNS,u'caption-id'),
 		(TABLENS,u'end-y'),
 		(SVGNS,u'x1'),
 		(DRAWNS,u'id'),
@@ -5215,6 +5333,7 @@ allowed_attributes = {
 	(DRAWNS,u'page'):(
 		(PRESENTATIONNS,u'presentation-page-layout-name'),
 		(DRAWNS,u'name'),
+		(DRAWNS,u'nav-order'),
 		(PRESENTATIONNS,u'use-footer-name'),
 		(DRAWNS,u'style-name'),
 		(PRESENTATIONNS,u'use-header-name'),
@@ -5224,6 +5343,7 @@ allowed_attributes = {
 	),
 	(DRAWNS,u'page-thumbnail'):(
 		(TABLENS,u'table-background'),
+                (DRAWNS,u'caption-id'),
 		(PRESENTATIONNS,u'user-transformed'),
 		(DRAWNS,u'layer'),
 		(TABLENS,u'end-cell-address'),
@@ -5255,6 +5375,7 @@ allowed_attributes = {
 		(TABLENS,u'table-background'),
 		(DRAWNS,u'layer'),
 		(TABLENS,u'end-cell-address'),
+                (DRAWNS,u'caption-id'),
 		(SVGNS,u'd'),
 		(DRAWNS,u'text-style-name'),
 		(DRAWNS,u'id'),
@@ -5283,6 +5404,7 @@ allowed_attributes = {
 		(XLINKNS,u'show'),
 	),
 	(DRAWNS,u'polygon'):(
+                (DRAWNS,u'caption-id'),
 		(TABLENS,u'table-background'),
 		(DRAWNS,u'layer'),
 		(TABLENS,u'end-cell-address'),
@@ -5313,6 +5435,7 @@ allowed_attributes = {
 		(DRAWNS,u'name'),
 		(DRAWNS,u'text-style-name'),
 		(DRAWNS,u'id'),
+                (DRAWNS,u'caption-id'),
 		(DRAWNS,u'transform'),
 		(PRESENTATIONNS,u'style-name'),
 		(SVGNS,u'height'),
@@ -5332,6 +5455,7 @@ allowed_attributes = {
 	),
 	(DRAWNS,u'rect'):(
 		(DRAWNS,u'corner-radius'),
+                (DRAWNS,u'caption-id'),
 		(DRAWNS,u'id'),
 		(DRAWNS,u'layer'),
 		(DRAWNS,u'name'),
@@ -5358,6 +5482,7 @@ allowed_attributes = {
 		(TABLENS,u'table-background'),
 		(DRAWNS,u'layer'),
 		(TABLENS,u'end-cell-address'),
+                (DRAWNS,u'caption-id'),
 		(DRAWNS,u'name'),
 		(DRAWNS,u'text-style-name'),
 		(TEXTNS,u'anchor-page-number'),
@@ -5396,6 +5521,7 @@ allowed_attributes = {
 		(FONS,u'min-height'),
 		(DRAWNS,u'chain-next-name'),
 		(FONS,u'max-width'),
+                (TEXTNS,u'id'),
 	),
 	(FORMNS,u'button'):(
 		(FORMNS,u'tab-stop'),
@@ -5968,6 +6094,7 @@ allowed_attributes = {
 	),
 	(OFFICENS,u'text'):(
 		(TEXTNS,u'global'),
+		(TEXTNS,u'use-soft-page-breaks'),
 	),
 	(PRESENTATIONNS,u'animation-group'):(
 	),
@@ -6436,6 +6563,7 @@ allowed_attributes = {
 		(STYLENS,u'wrap-contour'),
 		(STYLENS,u'wrap-contour-mode'),
 		(STYLENS,u'wrap-dynamic-threshold'),
+		(STYLENS,u'writing-mode'),
 		(SVGNS,u'fill-rule'),
 		(SVGNS,u'height'),
 		(SVGNS,u'stroke-color'),
@@ -6769,6 +6897,8 @@ allowed_attributes = {
 		(STYLENS,u'country-asian'),
 		(STYLENS,u'country-complex'),
 		(STYLENS,u'font-charset'),
+		(STYLENS,u'font-charset-asian'),
+		(STYLENS,u'font-charset-complex'),
 		(STYLENS,u'font-family-asian'),
 		(STYLENS,u'font-family-complex'),
 		(STYLENS,u'font-family-generic'),
@@ -6871,7 +7001,10 @@ allowed_attributes = {
 		(SVGNS,u'stop-opacity'),
 		(SVGNS,u'offset'),
 	),
+	(SVGNS,u'title'):(
+	),
 	(TABLENS,u'body'):(
+		(TEXTNS,u'paragraph-style-name'),
 		(TEXTNS,u'style-name'),
 	),
 	(TABLENS,u'calculation-settings'):(
@@ -6998,6 +7131,7 @@ allowed_attributes = {
 	(TABLENS,u'data-pilot-level'):(
 		(TABLENS,u'show-empty'),
 	),
+# allowed_attributes
 	(TABLENS,u'data-pilot-member'):(
 		(TABLENS,u'show-details'),
 		(TABLENS,u'name'),
@@ -7026,6 +7160,7 @@ allowed_attributes = {
 		(TABLENS,u'show-filter-button'),
 		(TABLENS,u'grand-total'),
 	),
+# allowed_attributes
 	(TABLENS,u'data-pilot-tables'):(
 	),
 	(TABLENS,u'database-range'):(
@@ -7046,6 +7181,7 @@ allowed_attributes = {
 		(TABLENS,u'query-name'),
 		(TABLENS,u'database-name'),
 	),
+# allowed_attributes
 	(TABLENS,u'database-source-sql'):(
 		(TABLENS,u'parse-sql-statement'),
 		(TABLENS,u'database-name'),
@@ -7068,6 +7204,7 @@ allowed_attributes = {
 		(TABLENS,u'type'),
 		(TABLENS,u'id'),
 	),
+# allowed_attributes
 	(TABLENS,u'deletions'):(
 	),
 	(TABLENS,u'dependencies'):(
@@ -7086,11 +7223,14 @@ allowed_attributes = {
 		(TABLENS,u'title'),
 	),
 	(TABLENS,u'even-columns'):(
+		(TEXTNS,u'paragraph-style-name'),
 		(TEXTNS,u'style-name'),
 	),
 	(TABLENS,u'even-rows'):(
+		(TEXTNS,u'paragraph-style-name'),
 		(TEXTNS,u'style-name'),
 	),
+# allowed_attributes
 	(TABLENS,u'filter'):(
 		(TABLENS,u'target-range-address'),
 		(TABLENS,u'display-duplicates'),
@@ -7109,11 +7249,14 @@ allowed_attributes = {
 	(TABLENS,u'filter-or'):(
 	),
 	(TABLENS,u'first-column'):(
+		(TEXTNS,u'paragraph-style-name'),
 		(TEXTNS,u'style-name'),
 	),
 	(TABLENS,u'first-row'):(
+		(TEXTNS,u'paragraph-style-name'),
 		(TEXTNS,u'style-name'),
 	),
+# allowed_attributes
 	(TABLENS,u'help-message'):(
 		(TABLENS,u'display'),
 		(TABLENS,u'title'),
@@ -7151,9 +7294,11 @@ allowed_attributes = {
 	(TABLENS,u'label-ranges'):(
 	),
 	(TABLENS,u'last-column'):(
+		(TEXTNS,u'paragraph-style-name'),
 		(TEXTNS,u'style-name'),
 	),
 	(TABLENS,u'last-row'):(
+		(TEXTNS,u'paragraph-style-name'),
 		(TEXTNS,u'style-name'),
 	),
 	(TABLENS,u'movement'):(
@@ -7180,12 +7325,15 @@ allowed_attributes = {
 		(TABLENS,u'cell-range-address'),
 	),
 	(TABLENS,u'null-date'):(
+		(TABLENS,u'date-value'),
 		(TABLENS,u'value-type'),
 	),
 	(TABLENS,u'odd-columns'):(
+		(TEXTNS,u'paragraph-style-name'),
 		(TEXTNS,u'style-name'),
 	),
 	(TABLENS,u'odd-rows'):(
+		(TEXTNS,u'paragraph-style-name'),
 		(TEXTNS,u'style-name'),
 	),
 	(TABLENS,u'operation'):(
@@ -7346,6 +7494,7 @@ allowed_attributes = {
 	(TEXTNS,u'a'):(
 		(TEXTNS,u'visited-style-name'),
 		(OFFICENS,u'name'),
+		(OFFICENS,u'title'),
 		(XLINKNS,u'show'),
 		(OFFICENS,u'target-frame-name'),
 		(XLINKNS,u'actuate'),
@@ -7986,6 +8135,8 @@ allowed_attributes = {
 	),
 	(TEXTNS,u'sheet-name'):(
 	),
+	(TEXTNS,u'soft-page-break'):(
+	),
 	(TEXTNS,u'sort-key'):(
 		(TEXTNS,u'sort-ascending'),
 		(TEXTNS,u'key'),
diff --git a/odf/office.py b/odf/office.py
index c4a9fe9..085e251 100644
--- a/odf/office.py
+++ b/odf/office.py
@@ -44,19 +44,19 @@ def Chart(**args):
 def DdeSource(**args):
     return Element(qname = (OFFICENS,'dde-source'), **args)
 
-def Document(version="1.0", **args):
+def Document(version="1.1", **args):
     return Element(qname = (OFFICENS,'document'), version=version, **args)
 
-def DocumentContent(version="1.0", **args):
+def DocumentContent(version="1.1", **args):
     return Element(qname = (OFFICENS, 'document-content'), version=version, **args)
 
-def DocumentMeta(version="1.0", **args):
+def DocumentMeta(version="1.1", **args):
     return Element(qname = (OFFICENS, 'document-meta'), version=version, **args)
 
-def DocumentSettings(version="1.0", **args):
+def DocumentSettings(version="1.1", **args):
     return Element(qname = (OFFICENS, 'document-settings'), version=version, **args)
 
-def DocumentStyles(version="1.0", **args):
+def DocumentStyles(version="1.1", **args):
     return Element(qname = (OFFICENS, 'document-styles'), version=version, **args)
 
 def Drawing(**args):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-odf.git



More information about the Python-modules-commits mailing list