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.
<?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>
<?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>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org
  • [dev] next-style-name ... Andrew Buza

Reply via email to