XML technologies / PresentationML / PresentationML introduction
Today’s office applications increasingly offer similar functions, blurring formerly clear boundaries. Tables now appear not only in spreadsheets but also in presentation and word-processing applications. Charts, text boxes and typographically styled text are similar examples: tools once associated with a particular application now appear in almost all office applications. Each application’s feature set therefore grows, making its data formats more complex. Conversion problems have existed as long as office applications have used different formats, but growing complexity makes conversion increasingly demanding.
Since 1998, XML technology has provided a completely open file format for reading and editing raw data, without formatting instructions, without additional software. More software vendors have recognized the benefits of XML interfaces, and XML has spread into mainstream office software. Microsoft’s clear market leadership made MS Office formats (“.xls”, “.doc”, “.ppt”, etc.) de facto standards for years through sheer prevalence. Microsoft has now also recognized that future applications must export formats compatible with competitors. Digital document exchange is growing, and senders cannot expect every recipient to use the same software.
Since Microsoft Office 2003, users can therefore export WordprocessingML, or WordML (for Word), and SpreadsheetML (for Excel). These two markup languages are XML specifications, like XHTML, DocBook or DITA, openly documented and relatively easy for any software vendor to convert into other XML formats. XML grammar, including tag names and permitted attributes, can be freely defined; XML Schema or DTDs specify rules for a particular XML document’s grammar. XML specifications or languages such as WordML and SpreadsheetML thus have their own schema-defined grammar.
After taking the first step towards open formats with WordML and SpreadsheetML, Microsoft developed entirely new XML-based data formats for Word, Excel and now also PowerPoint for “Office 2007”. Whereas Office 2003 exported XML through a separate file format, called “XML output” below, while retaining the old proprietary defaults, the new formats are also the defaults. Separate XML output remains available with a different structure, and PowerPoint now joins Word and Excel in supporting it. Both XML output and the default formats use WordprocessingML, SpreadsheetML and the new PresentationML language.
Table 1: overview of the new Office formats
Application | New format extension | Old format extension | Markup language |
|---|---|---|---|
Microsoft Word | DOCX | DOC | WordprocessingML |
Microsoft Excel | XLS | SpreadsheetML | |
Microsoft PowerPoint | PPT | PresentationML |
Additional XML markup languages handle specialized visual features. For example, formulas use Office MathML for their representation, and vector graphics use DrawingML. XML languages can be combined by assigning their elements to different namespaces. A namespace is normally defined by a URI in a pseudo-attribute on the document’s root element and assigned a prefix. This prefix identifies elements belonging to that namespace.
<d2t:wurzelelement xmlns:d2t=”http://www.data2type.de” xmlns:abc=“http://www.abc.de“> (1)
<d2t:element1> (2)
<abc:element2/> (3)
<abc:element3/> (3)
<abc:element4/> (3)
</d2t:element1>
</d2t:wurzelelement> 1 | On the root element, the namespaces “http://www.data2type.de” and “http://www.abc.de” are assigned prefixes d2t and abc respectively. The root belongs to the d2t namespace, as indicated by its d2t: prefix. The assignments use pseudo-attributes xmlns:d2t and xmlns:abc. |
2 | The element element1 also belongs to the d2t namespace. |
3 | All these elements belong to the abc namespace. |
The new formats improve both conversion into competitors’ formats and integration of content from the other applications. They are specified in “Office Open XML” (OOXML), standardized by Ecma International as “ECMA-376” in December 2006 and by ISO as “ISO/IEC 29500:2008” in November 2008.
With the prospect that OOXML and the new format could generate PowerPoint slides automatically from XML data through XSLT transformations, the following practical literature study describes the standard through PresentationML and, where necessary, DrawingML. The standard spans more than 60,000 pages, however, so even a condensed complete description would exceed this study’s scope. Only the most important elements will therefore be described.
PresentationML and DrawingML are used both in “.PPTX” and in explicit XML output. XML output stores a presentation in one XML file, whereas PPTX contains a ZIP-compressed collection of XML data with a predefined structure. Generating that structure through XSLT is much more complex than generating one XML file, so XML output takes priority here. The two are nevertheless directly related. PowerPoint’s XML output appeared only with Office 2007 and, unlike Word’s and Excel’s, closely follows PPTX. A brief account of the PPTX container structure therefore comes first as a basis for comparison.