[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: May automatic styles defined in styles.xml be referenced from content.xml?
Hi all, I've been working on some software to check style names and style references in ODF documents. During this work, the question arose: May automatic styles defined in styles.xml be referenced from content.xml? I've been digging through the specification versions to find an answer and strictly speaking it seems to be allowed since 1.2. For font-face-declarations a similar question can be asked. Here are statements on the topic that I could find: ODF 1.0 and 1.1 "<office:document-styles> Styles used in the document content and automatic styles used in the styles themselves. styles.xml" It does not say "only within the styles themselves", but "<office:document-content> Document content and automatic styles used in the content. content.xml" and "The <office:document-content> root contains only the document content, along with the automatic styles needed for the document content" implies that content.xml content does not look outside of content.xml for automatic styles. "The <office:document-styles> root contains all named styles of a document, along with the automatic styles needed for the named styles" ODF 1.2 public review draft 3 "The <office:document-content> root element contains document content and automatic styles used in a document. The file within the package for the <office:document-content> element is content.xml." "The <office:document-styles> root element contains styles used in document content and automatic styles used in styles. The file within the package for the <office:document-styles> element is styles.xml." "Styles and font face declarations are referenced by their style:name attribute. A referenced style or font face declaration should be defined in the same file as the reference, or in styles.xml." "For automatic styles, the name may be generated by OpenDocument producers. For each style family or style element, producers should generate distinct sets of names for automatic styles stored in the content.xml 3.1.3.2 and styles.xml 3.1.3.3 files. The names should also be distinct from the names used in the <office:styles> element inside the styles.xml files." Does this mean that a name for an automatic style of a certain family in content.xml must be distinct from the name of an automatic style of the same family in styles.xml? From the 1.0 and 1.1 specification, it appears that it is not allowed for automatic styles defined in styles.xml to be referenced from content.xml. But the 1.2 specification is less clear to me on this subject. Cheers, Jos
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]