PresentationXML.com
 

PresentationML Slides - Content - Shape Tree

Most of the content for a slide is attached to shapes and tables. (For more on shapes, see DrawingML - Shapes; for more on tables, see DrawingML - Tables.) The shapes and tables within presentation slides are themselves contained within a parent <p:spTree> element. The shape tree can contain pictures, shapes, connections and tables (within a <p:graphicFrame> element -- see DrawingML - Overview), as well as groups of shapes and properties of shape groups. The tree may also contain content not defined within the ECMA-376 specification.

Each shape or other object within the <p:spTree> is a unique level of z-ordering. This means that the order in which the shapes and objects appear in the <p:spTree> determines the order in which the shapes and objects are stacked upon each other when they overlap. The first shape in the tree has the lowest z-order and the last shape has the highest. For example, below are three overlapping shapes.

<p:sld . . . >
<p:cSld>
<p:spTree>
. . .
<p:sp>
. . [blue] . .
</p:sp>
<p:sp>
. . [orange] . .
</p:sp>
<p:sp>
. . [green] . .
</p:sp>
</p:spTree>
</p:cSld>
</p:sld>
Presentation slide

If we move the third shape to the first position, we get the following.

<p:sld . . . >
<p:cSld>
<p:spTree>
. . .
<p:sp>
. . [green] . .
</p:sp>
<p:sp>
. . [blue] . .
</p:sp>
<p:sp>
. . [orange] . .
</p:sp>
</p:spTree>
</p:cSld>
</p:sld>
Presentation slide

Child Elements of <p:spTree>:

ElementDescription
<p:contentPart>

Specifies a reference to XML content in a format not defined by the ECMA-376 specification, thereby allowing the native use of other interchange formats like MathML, SMIL, and SVG, This is not discussed further here.

<p:cxnSp>

Specifies a connection shape used to connect two <p:sp> elements. See DrawingML - Connectors for more.

<p:extLst>

Allows for the specification of extensions which may be used to store various kinds of data. Not covered here.

<p:graphicFrame>

Specifies a graphic such as a table or other object that was generated by an external xml source. This element acts as a container for such graphic data. See DrawingML - Placement within a Presentation Document and DrawingML - Overview.

<p:grpSp>

Specifies a group shape or two or more shapes grouped together so that they are treated as a single shape when transforms are applied. Its content model is the same as that of the <p:spTree> element. That is, it can contain group shapes, group shape properties, non-visual group shape properties, shapes, pics, connectors, etc.

<p:grpSpPr>

Specifies a set of properties for a group shape. The content model is very similar to the properties for a shape, except that it does not contain any geometry, since obviously the shape of the group is determined by the indiviual geometries of the shapes that comprise it. Also, the 2D transform (<a:xfrm>, defining the size (<a:ext>) and location (<a:off>) of the bounding box, contains additional child elements <a:chExt> and <a:chOff>. These indicate the child extents and child offset. See DrawingML - Shapes - Visual Properties for more.

<p:nvGrpSpPr>

Specifies a set of non-visual properties for a group shape. The content model is very similar to the non-visual properties for a shape, except that instead of a child element <p:cNvSpPr> there is a <p:cNvGrpSpPr>. Also note that for presentations, there is a <p:nvPr> element that contains multimedia content associated with an object, as well as shape placeholders (see Slides - Overview). See DrawingML - Shapes - Non-Visual Properties for more.

Child Elements of <p:nvGrpSpPr>:

ElementDescription
<p:cNvGrpSpPr>

Specifies non-visual group shape properties related to locks on the group (whether the group can be moved, resized, rotated, etc.). See discussion of the <p:spLocks> element for an individual shape, which corresponds to the <p:grpSpLocks> here for groups.

<p:cNvPr>

Specifies non-visual properties of the drawing canvas, such as id, name, description, whether the group is hidden, etc. See discussion of the <p:cNvPr> element for an individual shape.

<p:nvPr>

Specifies multimedia associated with an object (see Slides - Content - Multimedia), as well as placeholders for slide content (<p:ph> elements)(see Slides - Overview).

<p:pic>

Specifies the existence of a picture. See DrawingML - Pictures for details.

<p:sp>

Specifies the existence of a shape. See DrawingML - Shapes for details.

Below is a sample <p:spTree>.

<p:spTree>
<p:nvGrpSpPr>
<p:cNvPr id="1" name=""/>
<p:cNvGrpSpPr/>
<p:nvPr/>
</p:nvGrpSpPr>
<p:grpSpPr>
<a:xfrm>
<a:off x="0" y="0"/>
<a:ext cx="0" cy="0"/>
<a:chOff x="0" y="0"/>
<a:chExt cx="0" cy="0"/>
<a:xfrm>
</p:grpSpPr>
<p:sp>
<p:sp>
. . .
</p:sp>
<p:sp>
. . .
</p:sp>
<p:sp>
. . .
</p:sp>
</p:spTree>