ps-python-docx 1.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- docx/__init__.py +68 -0
- docx/api.py +37 -0
- docx/blkcntnr.py +101 -0
- docx/comments.py +163 -0
- docx/dml/__init__.py +0 -0
- docx/dml/color.py +112 -0
- docx/document.py +275 -0
- docx/drawing/__init__.py +59 -0
- docx/enum/__init__.py +0 -0
- docx/enum/base.py +150 -0
- docx/enum/dml.py +103 -0
- docx/enum/section.py +86 -0
- docx/enum/shape.py +19 -0
- docx/enum/style.py +452 -0
- docx/enum/table.py +136 -0
- docx/enum/text.py +367 -0
- docx/exceptions.py +18 -0
- docx/image/__init__.py +23 -0
- docx/image/bmp.py +43 -0
- docx/image/constants.py +172 -0
- docx/image/exceptions.py +13 -0
- docx/image/gif.py +38 -0
- docx/image/helpers.py +86 -0
- docx/image/image.py +234 -0
- docx/image/jpeg.py +425 -0
- docx/image/png.py +253 -0
- docx/image/tiff.py +289 -0
- docx/opc/__init__.py +0 -0
- docx/opc/constants.py +306 -0
- docx/opc/coreprops.py +142 -0
- docx/opc/exceptions.py +12 -0
- docx/opc/oxml.py +247 -0
- docx/opc/package.py +219 -0
- docx/opc/packuri.py +109 -0
- docx/opc/part.py +247 -0
- docx/opc/parts/__init__.py +0 -0
- docx/opc/parts/coreprops.py +48 -0
- docx/opc/phys_pkg.py +119 -0
- docx/opc/pkgreader.py +254 -0
- docx/opc/pkgwriter.py +115 -0
- docx/opc/rel.py +153 -0
- docx/opc/shared.py +31 -0
- docx/opc/spec.py +24 -0
- docx/oxml/__init__.py +261 -0
- docx/oxml/comments.py +124 -0
- docx/oxml/coreprops.py +298 -0
- docx/oxml/document.py +88 -0
- docx/oxml/drawing.py +11 -0
- docx/oxml/exceptions.py +10 -0
- docx/oxml/ns.py +109 -0
- docx/oxml/numbering.py +109 -0
- docx/oxml/parser.py +62 -0
- docx/oxml/section.py +537 -0
- docx/oxml/settings.py +138 -0
- docx/oxml/shape.py +299 -0
- docx/oxml/shared.py +52 -0
- docx/oxml/simpletypes.py +434 -0
- docx/oxml/styles.py +341 -0
- docx/oxml/table.py +977 -0
- docx/oxml/text/__init__.py +0 -0
- docx/oxml/text/font.py +333 -0
- docx/oxml/text/hyperlink.py +45 -0
- docx/oxml/text/pagebreak.py +278 -0
- docx/oxml/text/paragraph.py +106 -0
- docx/oxml/text/parfmt.py +392 -0
- docx/oxml/text/run.py +307 -0
- docx/oxml/xmlchemy.py +696 -0
- docx/package.py +110 -0
- docx/parts/__init__.py +0 -0
- docx/parts/comments.py +51 -0
- docx/parts/document.py +182 -0
- docx/parts/hdrftr.py +53 -0
- docx/parts/image.py +80 -0
- docx/parts/numbering.py +32 -0
- docx/parts/settings.py +50 -0
- docx/parts/story.py +95 -0
- docx/parts/styles.py +42 -0
- docx/parts/theme.py +53 -0
- docx/py.typed +0 -0
- docx/section.py +479 -0
- docx/settings.py +35 -0
- docx/shape.py +103 -0
- docx/shared.py +382 -0
- docx/styles/__init__.py +40 -0
- docx/styles/latent.py +198 -0
- docx/styles/style.py +264 -0
- docx/styles/styles.py +147 -0
- docx/table.py +537 -0
- docx/templates/default-comments.xml +12 -0
- docx/templates/default-docx-template/[Content_Types].xml +17 -0
- docx/templates/default-docx-template/_rels/.rels +7 -0
- docx/templates/default-docx-template/customXml/_rels/item1.xml.rels +4 -0
- docx/templates/default-docx-template/customXml/item1.xml +2 -0
- docx/templates/default-docx-template/customXml/itemProps1.xml +6 -0
- docx/templates/default-docx-template/docProps/app.xml +36 -0
- docx/templates/default-docx-template/docProps/core.xml +13 -0
- docx/templates/default-docx-template/docProps/thumbnail.jpeg +0 -0
- docx/templates/default-docx-template/word/_rels/document.xml.rels +11 -0
- docx/templates/default-docx-template/word/document.xml +11 -0
- docx/templates/default-docx-template/word/fontTable.xml +61 -0
- docx/templates/default-docx-template/word/numbering.xml +201 -0
- docx/templates/default-docx-template/word/settings.xml +53 -0
- docx/templates/default-docx-template/word/styles.xml +11844 -0
- docx/templates/default-docx-template/word/stylesWithEffects.xml +11800 -0
- docx/templates/default-docx-template/word/theme/theme1.xml +318 -0
- docx/templates/default-docx-template/word/webSettings.xml +5 -0
- docx/templates/default-footer.xml +27 -0
- docx/templates/default-header.xml +27 -0
- docx/templates/default-settings.xml +26 -0
- docx/templates/default-styles.xml +190 -0
- docx/templates/default.docx +0 -0
- docx/text/__init__.py +0 -0
- docx/text/font.py +472 -0
- docx/text/hyperlink.py +121 -0
- docx/text/pagebreak.py +104 -0
- docx/text/paragraph.py +173 -0
- docx/text/parfmt.py +286 -0
- docx/text/run.py +257 -0
- docx/text/tabstops.py +123 -0
- docx/theme.py +67 -0
- docx/types.py +34 -0
- ps_python_docx-1.3.0.dist-info/METADATA +77 -0
- ps_python_docx-1.3.0.dist-info/RECORD +126 -0
- ps_python_docx-1.3.0.dist-info/WHEEL +5 -0
- ps_python_docx-1.3.0.dist-info/licenses/LICENSE +20 -0
- ps_python_docx-1.3.0.dist-info/top_level.txt +1 -0
docx/oxml/styles.py
ADDED
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
"""Custom element classes related to the styles part."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from docx.enum.style import WD_STYLE_TYPE
|
|
6
|
+
from docx.oxml.simpletypes import ST_DecimalNumber, ST_OnOff, ST_String
|
|
7
|
+
from docx.oxml.xmlchemy import (
|
|
8
|
+
BaseOxmlElement,
|
|
9
|
+
OptionalAttribute,
|
|
10
|
+
RequiredAttribute,
|
|
11
|
+
ZeroOrMore,
|
|
12
|
+
ZeroOrOne,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def styleId_from_name(name):
|
|
17
|
+
"""Return the style id corresponding to `name`, taking into account special-case
|
|
18
|
+
names such as 'Heading 1'."""
|
|
19
|
+
return {
|
|
20
|
+
"caption": "Caption",
|
|
21
|
+
"heading 1": "Heading1",
|
|
22
|
+
"heading 2": "Heading2",
|
|
23
|
+
"heading 3": "Heading3",
|
|
24
|
+
"heading 4": "Heading4",
|
|
25
|
+
"heading 5": "Heading5",
|
|
26
|
+
"heading 6": "Heading6",
|
|
27
|
+
"heading 7": "Heading7",
|
|
28
|
+
"heading 8": "Heading8",
|
|
29
|
+
"heading 9": "Heading9",
|
|
30
|
+
}.get(name, name.replace(" ", ""))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class CT_DocDefaults(BaseOxmlElement):
|
|
34
|
+
"""Document-wide defaults for paragraph and character formatting."""
|
|
35
|
+
|
|
36
|
+
rPrDefault = ZeroOrOne("w:rPrDefault", successors=("w:pPrDefault",))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class CT_RPrDefault(BaseOxmlElement):
|
|
40
|
+
"""Container for default run properties."""
|
|
41
|
+
|
|
42
|
+
rPr = ZeroOrOne("w:rPr", successors=())
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class CT_LatentStyles(BaseOxmlElement):
|
|
46
|
+
"""`w:latentStyles` element, defining behavior defaults for latent styles and
|
|
47
|
+
containing `w:lsdException` child elements that each override those defaults for a
|
|
48
|
+
named latent style."""
|
|
49
|
+
|
|
50
|
+
lsdException = ZeroOrMore("w:lsdException", successors=())
|
|
51
|
+
|
|
52
|
+
count = OptionalAttribute("w:count", ST_DecimalNumber)
|
|
53
|
+
defLockedState = OptionalAttribute("w:defLockedState", ST_OnOff)
|
|
54
|
+
defQFormat = OptionalAttribute("w:defQFormat", ST_OnOff)
|
|
55
|
+
defSemiHidden = OptionalAttribute("w:defSemiHidden", ST_OnOff)
|
|
56
|
+
defUIPriority = OptionalAttribute("w:defUIPriority", ST_DecimalNumber)
|
|
57
|
+
defUnhideWhenUsed = OptionalAttribute("w:defUnhideWhenUsed", ST_OnOff)
|
|
58
|
+
|
|
59
|
+
def bool_prop(self, attr_name):
|
|
60
|
+
"""Return the boolean value of the attribute having `attr_name`, or |False| if
|
|
61
|
+
not present."""
|
|
62
|
+
value = getattr(self, attr_name)
|
|
63
|
+
if value is None:
|
|
64
|
+
return False
|
|
65
|
+
return value
|
|
66
|
+
|
|
67
|
+
def get_by_name(self, name):
|
|
68
|
+
"""Return the `w:lsdException` child having `name`, or |None| if not found."""
|
|
69
|
+
found = self.xpath('w:lsdException[@w:name="%s"]' % name)
|
|
70
|
+
if not found:
|
|
71
|
+
return None
|
|
72
|
+
return found[0]
|
|
73
|
+
|
|
74
|
+
def set_bool_prop(self, attr_name, value):
|
|
75
|
+
"""Set the on/off attribute having `attr_name` to `value`."""
|
|
76
|
+
setattr(self, attr_name, bool(value))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class CT_LsdException(BaseOxmlElement):
|
|
80
|
+
"""``<w:lsdException>`` element, defining override visibility behaviors for a named
|
|
81
|
+
latent style."""
|
|
82
|
+
|
|
83
|
+
locked = OptionalAttribute("w:locked", ST_OnOff)
|
|
84
|
+
name = RequiredAttribute("w:name", ST_String)
|
|
85
|
+
qFormat = OptionalAttribute("w:qFormat", ST_OnOff)
|
|
86
|
+
semiHidden = OptionalAttribute("w:semiHidden", ST_OnOff)
|
|
87
|
+
uiPriority = OptionalAttribute("w:uiPriority", ST_DecimalNumber)
|
|
88
|
+
unhideWhenUsed = OptionalAttribute("w:unhideWhenUsed", ST_OnOff)
|
|
89
|
+
|
|
90
|
+
def delete(self):
|
|
91
|
+
"""Remove this `w:lsdException` element from the XML document."""
|
|
92
|
+
self.getparent().remove(self)
|
|
93
|
+
|
|
94
|
+
def on_off_prop(self, attr_name):
|
|
95
|
+
"""Return the boolean value of the attribute having `attr_name`, or |None| if
|
|
96
|
+
not present."""
|
|
97
|
+
return getattr(self, attr_name)
|
|
98
|
+
|
|
99
|
+
def set_on_off_prop(self, attr_name, value):
|
|
100
|
+
"""Set the on/off attribute having `attr_name` to `value`."""
|
|
101
|
+
setattr(self, attr_name, value)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class CT_Style(BaseOxmlElement):
|
|
105
|
+
"""A ``<w:style>`` element, representing a style definition."""
|
|
106
|
+
|
|
107
|
+
_tag_seq = (
|
|
108
|
+
"w:name",
|
|
109
|
+
"w:aliases",
|
|
110
|
+
"w:basedOn",
|
|
111
|
+
"w:next",
|
|
112
|
+
"w:link",
|
|
113
|
+
"w:autoRedefine",
|
|
114
|
+
"w:hidden",
|
|
115
|
+
"w:uiPriority",
|
|
116
|
+
"w:semiHidden",
|
|
117
|
+
"w:unhideWhenUsed",
|
|
118
|
+
"w:qFormat",
|
|
119
|
+
"w:locked",
|
|
120
|
+
"w:personal",
|
|
121
|
+
"w:personalCompose",
|
|
122
|
+
"w:personalReply",
|
|
123
|
+
"w:rsid",
|
|
124
|
+
"w:pPr",
|
|
125
|
+
"w:rPr",
|
|
126
|
+
"w:tblPr",
|
|
127
|
+
"w:trPr",
|
|
128
|
+
"w:tcPr",
|
|
129
|
+
"w:tblStylePr",
|
|
130
|
+
)
|
|
131
|
+
name = ZeroOrOne("w:name", successors=_tag_seq[1:])
|
|
132
|
+
basedOn = ZeroOrOne("w:basedOn", successors=_tag_seq[3:])
|
|
133
|
+
next = ZeroOrOne("w:next", successors=_tag_seq[4:])
|
|
134
|
+
link = ZeroOrOne("w:link", successors=_tag_seq[5:])
|
|
135
|
+
uiPriority = ZeroOrOne("w:uiPriority", successors=_tag_seq[8:])
|
|
136
|
+
semiHidden = ZeroOrOne("w:semiHidden", successors=_tag_seq[9:])
|
|
137
|
+
unhideWhenUsed = ZeroOrOne("w:unhideWhenUsed", successors=_tag_seq[10:])
|
|
138
|
+
qFormat = ZeroOrOne("w:qFormat", successors=_tag_seq[11:])
|
|
139
|
+
locked = ZeroOrOne("w:locked", successors=_tag_seq[12:])
|
|
140
|
+
pPr = ZeroOrOne("w:pPr", successors=_tag_seq[17:])
|
|
141
|
+
rPr = ZeroOrOne("w:rPr", successors=_tag_seq[18:])
|
|
142
|
+
del _tag_seq
|
|
143
|
+
|
|
144
|
+
type: WD_STYLE_TYPE | None = OptionalAttribute( # pyright: ignore[reportAssignmentType]
|
|
145
|
+
"w:type", WD_STYLE_TYPE
|
|
146
|
+
)
|
|
147
|
+
styleId: str | None = OptionalAttribute( # pyright: ignore[reportAssignmentType]
|
|
148
|
+
"w:styleId", ST_String
|
|
149
|
+
)
|
|
150
|
+
default = OptionalAttribute("w:default", ST_OnOff)
|
|
151
|
+
customStyle = OptionalAttribute("w:customStyle", ST_OnOff)
|
|
152
|
+
|
|
153
|
+
@property
|
|
154
|
+
def basedOn_val(self):
|
|
155
|
+
"""Value of `w:basedOn/@w:val` or |None| if not present."""
|
|
156
|
+
basedOn = self.basedOn
|
|
157
|
+
if basedOn is None:
|
|
158
|
+
return None
|
|
159
|
+
return basedOn.val
|
|
160
|
+
|
|
161
|
+
@basedOn_val.setter
|
|
162
|
+
def basedOn_val(self, value):
|
|
163
|
+
if value is None:
|
|
164
|
+
self._remove_basedOn()
|
|
165
|
+
else:
|
|
166
|
+
self.get_or_add_basedOn().val = value
|
|
167
|
+
|
|
168
|
+
@property
|
|
169
|
+
def linked_style(self):
|
|
170
|
+
"""Sibling style referenced by ``w:link``, or |None| for a missing target."""
|
|
171
|
+
if self.link is None or self.getparent() is None:
|
|
172
|
+
return None
|
|
173
|
+
return self.getparent().get_by_id(self.link.val)
|
|
174
|
+
|
|
175
|
+
@property
|
|
176
|
+
def base_style(self):
|
|
177
|
+
"""Sibling CT_Style element this style is based on or |None| if no base style or
|
|
178
|
+
base style not found."""
|
|
179
|
+
basedOn = self.basedOn
|
|
180
|
+
if basedOn is None:
|
|
181
|
+
return None
|
|
182
|
+
styles = self.getparent()
|
|
183
|
+
base_style = styles.get_by_id(basedOn.val)
|
|
184
|
+
if base_style is None:
|
|
185
|
+
return None
|
|
186
|
+
return base_style
|
|
187
|
+
|
|
188
|
+
def delete(self):
|
|
189
|
+
"""Remove this `w:style` element from its parent `w:styles` element."""
|
|
190
|
+
self.getparent().remove(self)
|
|
191
|
+
|
|
192
|
+
@property
|
|
193
|
+
def locked_val(self):
|
|
194
|
+
"""Value of `w:locked/@w:val` or |False| if not present."""
|
|
195
|
+
locked = self.locked
|
|
196
|
+
if locked is None:
|
|
197
|
+
return False
|
|
198
|
+
return locked.val
|
|
199
|
+
|
|
200
|
+
@locked_val.setter
|
|
201
|
+
def locked_val(self, value):
|
|
202
|
+
self._remove_locked()
|
|
203
|
+
if bool(value) is True:
|
|
204
|
+
locked = self._add_locked()
|
|
205
|
+
locked.val = value
|
|
206
|
+
|
|
207
|
+
@property
|
|
208
|
+
def name_val(self):
|
|
209
|
+
"""Value of ``<w:name>`` child or |None| if not present."""
|
|
210
|
+
name = self.name
|
|
211
|
+
if name is None:
|
|
212
|
+
return None
|
|
213
|
+
return name.val
|
|
214
|
+
|
|
215
|
+
@name_val.setter
|
|
216
|
+
def name_val(self, value):
|
|
217
|
+
self._remove_name()
|
|
218
|
+
if value is not None:
|
|
219
|
+
name = self._add_name()
|
|
220
|
+
name.val = value
|
|
221
|
+
|
|
222
|
+
@property
|
|
223
|
+
def next_style(self):
|
|
224
|
+
"""Sibling CT_Style element identified by the value of `w:name/@w:val` or |None|
|
|
225
|
+
if no value is present or no style with that style id is found."""
|
|
226
|
+
next = self.next
|
|
227
|
+
if next is None:
|
|
228
|
+
return None
|
|
229
|
+
styles = self.getparent()
|
|
230
|
+
return styles.get_by_id(next.val) # None if not found
|
|
231
|
+
|
|
232
|
+
@property
|
|
233
|
+
def qFormat_val(self):
|
|
234
|
+
"""Value of `w:qFormat/@w:val` or |False| if not present."""
|
|
235
|
+
qFormat = self.qFormat
|
|
236
|
+
if qFormat is None:
|
|
237
|
+
return False
|
|
238
|
+
return qFormat.val
|
|
239
|
+
|
|
240
|
+
@qFormat_val.setter
|
|
241
|
+
def qFormat_val(self, value):
|
|
242
|
+
self._remove_qFormat()
|
|
243
|
+
if bool(value):
|
|
244
|
+
self._add_qFormat()
|
|
245
|
+
|
|
246
|
+
@property
|
|
247
|
+
def semiHidden_val(self):
|
|
248
|
+
"""Value of ``<w:semiHidden>`` child or |False| if not present."""
|
|
249
|
+
semiHidden = self.semiHidden
|
|
250
|
+
if semiHidden is None:
|
|
251
|
+
return False
|
|
252
|
+
return semiHidden.val
|
|
253
|
+
|
|
254
|
+
@semiHidden_val.setter
|
|
255
|
+
def semiHidden_val(self, value):
|
|
256
|
+
self._remove_semiHidden()
|
|
257
|
+
if bool(value) is True:
|
|
258
|
+
semiHidden = self._add_semiHidden()
|
|
259
|
+
semiHidden.val = value
|
|
260
|
+
|
|
261
|
+
@property
|
|
262
|
+
def uiPriority_val(self):
|
|
263
|
+
"""Value of ``<w:uiPriority>`` child or |None| if not present."""
|
|
264
|
+
uiPriority = self.uiPriority
|
|
265
|
+
if uiPriority is None:
|
|
266
|
+
return None
|
|
267
|
+
return uiPriority.val
|
|
268
|
+
|
|
269
|
+
@uiPriority_val.setter
|
|
270
|
+
def uiPriority_val(self, value):
|
|
271
|
+
self._remove_uiPriority()
|
|
272
|
+
if value is not None:
|
|
273
|
+
uiPriority = self._add_uiPriority()
|
|
274
|
+
uiPriority.val = value
|
|
275
|
+
|
|
276
|
+
@property
|
|
277
|
+
def unhideWhenUsed_val(self):
|
|
278
|
+
"""Value of `w:unhideWhenUsed/@w:val` or |False| if not present."""
|
|
279
|
+
unhideWhenUsed = self.unhideWhenUsed
|
|
280
|
+
if unhideWhenUsed is None:
|
|
281
|
+
return False
|
|
282
|
+
return unhideWhenUsed.val
|
|
283
|
+
|
|
284
|
+
@unhideWhenUsed_val.setter
|
|
285
|
+
def unhideWhenUsed_val(self, value):
|
|
286
|
+
self._remove_unhideWhenUsed()
|
|
287
|
+
if bool(value) is True:
|
|
288
|
+
unhideWhenUsed = self._add_unhideWhenUsed()
|
|
289
|
+
unhideWhenUsed.val = value
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
class CT_Styles(BaseOxmlElement):
|
|
293
|
+
"""``<w:styles>`` element, the root element of a styles part, i.e. styles.xml."""
|
|
294
|
+
|
|
295
|
+
_tag_seq = ("w:docDefaults", "w:latentStyles", "w:style")
|
|
296
|
+
docDefaults = ZeroOrOne("w:docDefaults", successors=_tag_seq[1:])
|
|
297
|
+
latentStyles = ZeroOrOne("w:latentStyles", successors=_tag_seq[2:])
|
|
298
|
+
style = ZeroOrMore("w:style", successors=())
|
|
299
|
+
del _tag_seq
|
|
300
|
+
|
|
301
|
+
def add_style_of_type(self, name, style_type, builtin):
|
|
302
|
+
"""Return a newly added `w:style` element having `name` and `style_type`.
|
|
303
|
+
|
|
304
|
+
`w:style/@customStyle` is set based on the value of `builtin`.
|
|
305
|
+
"""
|
|
306
|
+
style = self.add_style()
|
|
307
|
+
style.type = style_type
|
|
308
|
+
style.customStyle = None if builtin else True
|
|
309
|
+
style.styleId = styleId_from_name(name)
|
|
310
|
+
style.name_val = name
|
|
311
|
+
return style
|
|
312
|
+
|
|
313
|
+
def default_for(self, style_type):
|
|
314
|
+
"""Return `w:style[@w:type="*{style_type}*][-1]` or |None| if not found."""
|
|
315
|
+
default_styles_for_type = [
|
|
316
|
+
s for s in self._iter_styles() if s.type == style_type and s.default
|
|
317
|
+
]
|
|
318
|
+
if not default_styles_for_type:
|
|
319
|
+
return None
|
|
320
|
+
# spec calls for last default in document order
|
|
321
|
+
return default_styles_for_type[-1]
|
|
322
|
+
|
|
323
|
+
def get_by_id(self, styleId: str) -> CT_Style | None:
|
|
324
|
+
"""`w:style` child where @styleId = `styleId`.
|
|
325
|
+
|
|
326
|
+
|None| if not found.
|
|
327
|
+
"""
|
|
328
|
+
xpath = f'w:style[@w:styleId="{styleId}"]'
|
|
329
|
+
return next(iter(self.xpath(xpath)), None)
|
|
330
|
+
|
|
331
|
+
def get_by_name(self, name: str) -> CT_Style | None:
|
|
332
|
+
"""`w:style` child with `w:name` grandchild having value `name`.
|
|
333
|
+
|
|
334
|
+
|None| if not found.
|
|
335
|
+
"""
|
|
336
|
+
xpath = 'w:style[w:name/@w:val="%s"]' % name
|
|
337
|
+
return next(iter(self.xpath(xpath)), None)
|
|
338
|
+
|
|
339
|
+
def _iter_styles(self):
|
|
340
|
+
"""Generate each of the `w:style` child elements in document order."""
|
|
341
|
+
return (style for style in self.xpath("w:style"))
|