locked
Style Inheritance not generated properly by Word 2010 RRS feed

  • Question

  • When defining styles using Word UI I can select base style for another style.

    For example I create character style named Bold with bold font. Then I create character style named BoldItalic based on Bold style and only set italic property to true for this new style; new style is now bold and italic.

    According to OOXML Standard §17.7.1 "producer [ie. MS Word] should not output any property on a style which has already been set by a previous level of the style hierarchy, as well as those which match the document defaults. This means that if the document defaults or any previous level in a style’s hierarchy specify a property which is unchanged at this level, that property should not be part of the style definition in the resulting WordprocessingML."

    But generated WordprocessingML(extracted from DOCX file) shows different generated output: BoldItalic style has defined both of the properties: bold and italic, although there should be only italic property to be set.

    Here is style definition produced by Word 2010:

       <w:style w:type="character" w:customStyle="1" w:styleId="Bold">
            <w:name w:val="Bold"/>
            <w:basedOn w:val="Standardnpsmoodstavce"/>
            <w:uiPriority w:val="1"/>
            <w:rsid w:val="0000385E"/>
            <w:rPr>
                <w:b/>
            </w:rPr>
        </w:style>
        <w:style w:type="character" w:customStyle="1" w:styleId="BoldItalic">
            <w:name w:val="BoldItalic"/>
            <w:basedOn w:val="Bold"/>
            <w:uiPriority w:val="1"/>
            <w:rsid w:val="0000385E"/>
            <w:rPr>
                <w:b/>
                <w:i/>
            </w:rPr>
        </w:style>


    Boris Lehečka (Word, Access, VBA, XML, C#, SQL)

    Wednesday, September 25, 2013 8:48 PM

Answers

  • Hi Boris,

    Thank you for bringing to our attention that Word unnecessarily duplicates information in the inherited style paragraph and this also contradict to ISO 29500-1 section 17.7.1 Style Inheritance. I submitted a suggestion that it should be fixed.

    Thanks, Vilmos

    Tuesday, October 29, 2013 7:32 PM

All replies

  • I'm afraid this isn't the correct forum for your question. This forums targets performing automation operations using Word's APIs. I think the proper place for this would be the forum about implementation of the Office Open XML file formats, but before I move your question there I want to ask if you were already there and referred to come here?

    Cindy Meister, VSTO/Word MVP, my blog

    Monday, September 30, 2013 6:23 PM
  • I agree, there may be better forum for my suggestion, but I don't know which one to choose. I don't think that Open XML SDK forum is relevant because the producer of the markup in this case is Microsoft Word, not Open XML SDK.

    If you find better forum, please move my question there.

    Thank you.


    Boris Lehečka (Word, Access, VBA, XML, C#, SQL)

    Monday, September 30, 2013 7:13 PM
  • Hi Boris,

    Thank you for your question. A member of the Protocol Documentation support team will respond to you soon.

    Regards,
    Vilmos Foltenyi - MSFT

    Tuesday, October 1, 2013 7:50 PM
  • Hi Boris,

    I am the engineer who will be working with you on this issue. Please send the whole .docx file to me. Be sure that the file doesn’t contain any confidential information; the file is probably small enough so you can send it as attachment to ‘dochelp (at) microsoft (dot) com’ and in the e-mail indicate that it is for me.

    Regards,
    Vilmos Foltenyi - MSFT

    Wednesday, October 2, 2013 5:41 PM
  • I’ve got the .docx file from Boris and I’m going to analyze it.
    Thanks, Vilmos
    Thursday, October 3, 2013 6:16 PM
  • Hi Boris,

    I submitted a question about the extra <w:b/> line in the “BoldItalic” style.

    Thanks, Vilmos

    Thursday, October 24, 2013 7:05 PM
  • Hi Boris,

    Thank you for bringing to our attention that Word unnecessarily duplicates information in the inherited style paragraph and this also contradict to ISO 29500-1 section 17.7.1 Style Inheritance. I submitted a suggestion that it should be fixed.

    Thanks, Vilmos

    Tuesday, October 29, 2013 7:32 PM