Chapter 4. Text Documents—Advanced
Frames
A frame in an OpenDocument word processing document is much like a section; it's an independent area of text which may have multiple columns. The difference between a frame and a section is that a frame may “float” and have the main text wrap around it. Frames are also anchored to the page, a pargraph, or an individual character. They may also act as though they are just another character in the stream of the text.
Style Information for Frames
Each frame will have a <style:style> element whose style:name begins with fr and whose style:family is graphic (yes, frames are actually considered to be graphic objects). Its style:parent-style-name will be Frame.
Within the <style:style> is a <style:graphic-properties> element with these relevant attributes:
style:vertical-rel
This attribute tells where the frame is anchored: page, paragraph-content, or char. If the frame is anchored as a character, then this attribute has the value baseline.
style:vertical-pos
This gives the vertical position with respect to the anchor: top, middle, or bottom. If you have manually adjusted a frame by moving it, then this value will be from-top, and the offset will be in the body of the document.
style:horizontal-rel
Depending upon the anchorage of the frame, this attribute can have the following values: page and page-content (the entire page or just the text area), page-start-margin and page-end-margin, paragraph and paragraph-content, paragraph-start-margin ...
Get OASIS OpenDocument Essentials: Using OASIS OpenDocument XML now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.