J.4.4 Understanding the Important Parts in a Document
Again, given the variety of documents that are created, it would be futile to create a structure that all documents need to fit into. Hence, it is recommended that the most effective way for developers to identify important parts of a document is based on common primitives in IS 29500.
A prime example of this would be identifying the titles of each slide. Each slide can have a title placeholder that, generally, represents the title for that particular slide. The title itself is easily accessed by looking for the title placeholder in slide.xml.
By looking into the current slide’s shape tree, one can evaluate each shape’s non-visual properties to see which shape is the title placeholder:
<p:spTree>
<p:nvGrpSpPr>…</p:nvGrpSpPr>
<p:grpSpPr>…</p:grpSpPr>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="2" name="Title 1"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<p:ph type="ctrTitle"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>Strategic Initiatives for Growth</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</p:txBody>
</p:sp>
…
<p:/spTree>
A similar approach can be used to identify which shapes on a slide are placeholders versus floating objects, or even which shapes on a slide are shapes which contain text and those which are shapes that don’t contain text.