OASIS Open Document Format for Office Applications (OpenDocument) TC

RE: [office] Proposal for lists/numbered paragraphs

  • 1.  RE: [office] Proposal for lists/numbered paragraphs

    Posted 03-24-2003 15:41
    Hi David
    
    On reviewing the schema I see you are correct that paragraph style can
    reference a list style which allows (but does not require) a connection
    to be established between para and list styles. This brings up another
    issue for me. Doesn't this produce redundancy and potential conflict
    between the list style associated at the text:unordered-list and the
    list style associated at the paragraph level. OpenOffice currently
    generates XML like this...
    
    <office:automatic-styles>
       <style:style style:name="P1" style:family="paragraph"
    style:parent-style-name="First line indent" style:list-style-name="List
    4"/>
    </office:automatic-styles>
    
            <text:unordered-list text:style-name="List 4">
                <text:list-item>
                    <text:p text:style-name="P1">One</text:p>
                </text:list-item>
                <text:list-item>
                    <text:p text:style-name="P1">Two</text:p>
                </text:list-item>
                <text:list-item>
                    <text:p text:style-name="P1">Three</text:p>
                </text:list-item>
            </text:unordered-list>
    
    
    Notice that "List 4" is referenced both by the text:unordered-list and
    by the "P1" paragraph style. What if "P1" referenced a different list
    style? How would I be required to interpret this? 
    
    Since the paragraph style already contains the list style information,
    from a rendering standpoint in this example the text:unordered-list is
    completely redundant and the text:list-item is simply defining a list
    level. List level could be easily done with an attribute (which could
    default to 1) producing the following alternative XML. 
    
    <text:p text:style-name="P1">One</text:p>
    <text:p text:style-name="P1">Two</text:p>
    <text:p text:style-name="P1">Three</text:p>
    
    This all seems like a lot of extra syntax just so HTML generation can
    eaisly produce <OL> and <LI> tags. 
    
    -Phil