none
How does PowerPoint distinguish between significant and nonsignificant whitespace in xml markup? RRS feed

  • Question

  • Dear MS Support,

    We have a pptx file where I cannot figure out how does office decide which whitespace is  significant and which one is not. The code in question is the following:

    <a:p>
    <a:pPr indent="-285750" marL="285750">
    <a:buClr>
    <a:srgbClr val="FF0000"/>
    </a:buClr>
    <a:buFont charset="0" pitchFamily="34" panose="020B0604020202020204" typeface="Arial"/>
    <a:buChar char="•"/>
    </a:pPr>
    <a:r>
    <a:rPr lang="fr-FR" smtClean="0" err="1" dirty="0"/>
    <a:t>Risk</a:t>
    </a:r>
    <a:r>
    <a:rPr lang="fr-FR" smtClean="0" dirty="0"/>
    <a:t> </a:t>
    </a:r>
    <a:r>
    <a:rPr lang="fr-FR" smtClean="0" err="1" dirty="0"/>
    <a:t>assessment</a:t>
    </a:r>
    <a:endParaRPr lang="fr-FR" dirty="0"/>
    </a:p>

    The interesting part is the second 't' tag, containing only a single whitespace. The markup never declares xml:space="preserve", so this whitespace is not considered significant according the xml standard. Nevertheless, it appears when opened in PowerPoint.

    My suspicion is that office considers any white space (significant or not) and displays it as part of the text if it appears inside a t element. Am I correct in this?

    If needed, I can send a small sample file to illustrate the issue.

    Best regards,

    Sándor Kolumbán

     30759
    Friday, August 4, 2017 7:09 AM

Answers

  • Hello Sandor - 

    Per analysis; 'xml:space' attribute is not required for 'a:t' element since it is not specified in section 21.1.2.3.11 t (Text String) of ISO/IEC 29500. As a result, PowerPoint is not respecting this attribute therefore it won't be able to distinguish between significant or non-significant whitespaces. All whitespaces are treated significant for PowerPoint.

    PS - If this attribute is required then it will be mentioned like the way it's mentioned for 'w:t' element in section 17.3.3.31 't (Text)' of ISO/IEC 29500

    Thanks


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Monday, August 7, 2017 8:15 PM

All replies

  • Sándor,

    Thank you for your question.  An engineer from the protocols team will contact you soon.


    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team

    Friday, August 4, 2017 3:56 PM
    Moderator
  • Hello Sandor - 

    I'll help you with this inquiry. Kindly send your sample file to my attention at dochelp (at) Microsoft (dot) com

    Thanks


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team


    Friday, August 4, 2017 5:04 PM
  • Hello Tarun,

      I sent the sample to you. Thanks for helping out.

    Cheers,

      Sándor

    Friday, August 4, 2017 5:49 PM
  • Thanks Sandor. I'll look into it and get back.

    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Saturday, August 5, 2017 10:24 PM
  • Hello Sandor - 

    Per analysis; 'xml:space' attribute is not required for 'a:t' element since it is not specified in section 21.1.2.3.11 t (Text String) of ISO/IEC 29500. As a result, PowerPoint is not respecting this attribute therefore it won't be able to distinguish between significant or non-significant whitespaces. All whitespaces are treated significant for PowerPoint.

    PS - If this attribute is required then it will be mentioned like the way it's mentioned for 'w:t' element in section 17.3.3.31 't (Text)' of ISO/IEC 29500

    Thanks


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Monday, August 7, 2017 8:15 PM
  • Hello Tarun,

    This was also my intuition, that PowerPoint is not respecting the xml standard when reading these files. Thanks for the confirmation.

    Cheers,

    Sándor Kolumbán

    Tuesday, August 8, 2017 5:34 AM