next-style-name not applied when opening generated ODT

Andrew Buza <[email protected]>
Newsgroups gmane.comp.openoffice.devel.general
Message-ID <[email protected]>
I'm creating ODF text documents using Python's XML libraries and am running
into a little snag. The documents I'm creating seem to be working when
opened in OpenOffice.org, with the exception of the next-style-name
attribute. If I have a style with a next-style-name defined it won't be
applied to that style when opened. For example, in the included style
definitions, "Style1" should have a next style of "Block Text", but when
opened it will be "Style1" instead.

I've gone through the ODF specification and compared what I have with ODT
files generated by OO.o, but I haven't been able to determine where I'm
going wrong. What might the problem be?

My content and styles XML defintions should be attached to this message.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
content.xml (text/xml, 577 B)
<?xml version='1.0' encoding='utf-8'?>
<office:document-content office:version="1.2" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"><office:automatic-styles /><office:body><office:text><text:p text:style-name="Style1"><text:span>Paragraph number one</text:span></text:p><text:p text:style-name="Block_20_Text"><text:span>Following paragraph</text:span></text:p><text:p text:style-name="Normal"><text:span>Paragraph number two</text:span></text:p></office:text></office:body></office:document-content>
styles.xml (text/xml, 2.8 KB)
<?xml version='1.0' encoding='utf-8'?>
<office:document-styles office:version="1.2" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"><office:styles><style:style style:display-name="Block Text" style:family="paragraph" style:name="Block_20_Text"><style:paragraph-properties fo:margin-bottom="6pt" fo:margin-left="72pt" fo:margin-right="72pt" fo:margin-top="0pt" /><style:text-properties style:font-name="Times New Roman" fo:font-size="12pt" /></style:style><style:style style:display-name="Body Text" style:family="paragraph" style:name="Body_20_Text"><style:paragraph-properties fo:margin-bottom="6pt" fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-top="0pt" /><style:text-properties style:font-name="Times New Roman" fo:font-size="12pt" /></style:style><style:style style:display-name="Caption" style:family="paragraph" style:name="Caption"><style:paragraph-properties fo:margin-bottom="6pt" fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-top="6pt" /><style:text-properties style:font-name="Times New Roman" fo:font-size="12pt" fo:font-style="italic" /></style:style><style:style style:display-name="Heading" style:family="paragraph" style:name="Heading" style:next-style-name="Body_20_Text"><style:paragraph-properties fo:margin-bottom="6pt" fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-top="11pt" /><style:text-properties style:font-name="Times New Roman" fo:font-size="12pt" /></style:style><style:style style:display-name="Index" style:family="paragraph" style:name="Index"><style:paragraph-properties fo:margin-bottom="0pt" fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-top="0pt" /><style:text-properties style:font-name="Times New Roman" fo:font-size="12pt" /></style:style><style:style style:display-name="List" style:family="paragraph" style:name="List"><style:paragraph-properties fo:margin-bottom="0pt" fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-top="0pt" /><style:text-properties style:font-name="Times New Roman" fo:font-size="12pt" /></style:style><style:style style:display-name="Normal" style:family="paragraph" style:name="Normal"><style:paragraph-properties fo:margin-bottom="0pt" fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-top="0pt" /><style:text-properties style:font-name="Times New Roman" fo:font-size="12pt" /></style:style><style:style style:display-name="Style1" style:family="paragraph" style:name="Style1" style:next-style-name="Block_20_Text"><style:paragraph-properties fo:margin-bottom="0pt" fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-top="0pt" /><style:text-properties style:font-name="Times New Roman" fo:font-size="12pt" /></style:style></office:styles></office:document-styles>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.