none
Where is <txSp> in the XML for a shape? RRS feed

  • Question

  • I'm looking at the ECMA spec for shapes, and comparing that to the XML that Excel and Powerpoint generate when I add a shape with text.  According to the spec at 20.1.2.2.33, a shape <sp> element can contain a <txSp>, which may contain a <txBody>.   But a <sp> does not contain a <txBody> as a child itself.  Yet when I look at the xml from Powerpoint, the <sp> element contains a child <txBody> but no <txSp>.  What's going on here? Is Powerpoint just not following the spec here?

    Daniel Dick

    Wednesday, August 22, 2012 1:39 PM

Answers

  • Yeah, I didn't see the definition for <sp> within the spreadsheet or presentation sections of the spec--you're right, they clearly show <sp> containing a child <txBody>.  This is true for both the spreadsheetDrawing namespace (ECMA spec at 20.5.2.29) and the presentation main namespace at 19.3.1.43.  I was looking at the main drawingML portion of the spec , and there, at 20.1.2.2.33, <sp> cannot contain a <txBody> as a direct child.  It can contain a <txSp>, which can contain a <txBody>.  Maybe it's a mistake in the spec or something.  I don't know why it would be different there, but I guess it doesn't matter. 

    Daniel Dick

    Thursday, August 23, 2012 1:45 PM

All replies

  • Hi danrdick,

    Thanks for posting in the MSDN Forum.

    I think you'd better show some xml snippet here to clarify your goal. And in my opinion, either SpreadsheetDocument or PresentationDocument the hierarchy of shape is: Shape(<??:sp>) -> TextBody(<??:txBody>)->Paragraph(<?:p>)->Run(<?:r>)->Text(<?:t>).

    Have a good day,

    Tom 


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us


    Thursday, August 23, 2012 6:52 AM
    Moderator
  • Yeah, I didn't see the definition for <sp> within the spreadsheet or presentation sections of the spec--you're right, they clearly show <sp> containing a child <txBody>.  This is true for both the spreadsheetDrawing namespace (ECMA spec at 20.5.2.29) and the presentation main namespace at 19.3.1.43.  I was looking at the main drawingML portion of the spec , and there, at 20.1.2.2.33, <sp> cannot contain a <txBody> as a direct child.  It can contain a <txSp>, which can contain a <txBody>.  Maybe it's a mistake in the spec or something.  I don't know why it would be different there, but I guess it doesn't matter. 

    Daniel Dick

    Thursday, August 23, 2012 1:45 PM
  • Hi danrdick,

    Yes, I think so. I think we will not waste more time on this option if you document works fine on your side.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, August 27, 2012 4:58 AM
    Moderator