OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only
  • 1.  Automatic-style naming

    Posted 12-13-2005 19:10
     MHonArc v2.5.0b2 -->
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    office message

    [Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


    Subject: Automatic-style naming


    The OpenDocument specification doesn't seem to tell specifically whether it's allowed
    to have automatic styles with the same name (but different properties) in content.xml
    and in styles.xml.
    
    Someone sent me an OOo document where P1 and P2 were defined both in
    content.xml and styles.xml. Is this allowed?
    If it is allowed, how does this work with flat xml? I guess it's not allowed in flat xml, right?
    (which would mean that transforming a zip-based document to flat xml wouldn't be
    just a simple concatenation after all).
    
    In styles.xml :
      <office:automatic-styles>
        <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Footer">
          <style:paragraph-properties fo:text-align="center" style:justify-single-word="false">
         ...
    
          <style:footer>
            <text:p text:style-name="P2">this text is centered</text:p>
          </style:footer>
    
    In content.xml:
       <office:automatic-styles>
        <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
          <style:paragraph-properties fo:text-align="justify" style:justify-single-word="false"/>
       ...
    
    Thanks for confirming that this is allowed, and I'll fix KOffice for it.
    It seems to me that the specification could be clarified on this topic, since it's quite
    tempting to store all styles into a global name-based dictionary upon reading, but
    if the above is allowed then a single dictionary can't be used.
    
    -- 
    David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
    Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
    


    [Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]