Next: , Up: SPSS Viewer File Format   [Contents][Index]


D.1 Structure Member Format

A structure member lays out the high-level structure for a group of output items such as heading, tables, and charts. Structure members do not include the details of tables and charts but instead refer to them by their member names.

Structure members’ XML files claim conformance with a collection of XML Schemas. These schemas are distributed, under a nonfree license, with SPSS binaries. Fortunately, the schemas are not necessary to understand the structure members. The schemas can even be deceptive because they document elements and attributes that are not in the corpus and do not document elements and attributes that are commonly found in the corpus.

Structure members use a different XML namespace for each schema, but these namespaces are not entirely consistent. In some SPV files, for example, the viewer-tree schema is associated with namespace ‘http://xml.spss.com/spss/viewer-tree’ and in others with ‘http://xml.spss.com/spss/viewer/viewer-tree’ (note the additional viewer/). Under either name, the schema URIs are not resolvable to obtain the schemas themselves.

One may ignore all of the above in interpreting a structure member. The actual XML has a simple and straightforward form that does not require a reader to take schemas or namespaces into account. A structure member’s root is heading element, which contains heading or container elements (or a mix), forming a tree. In turn, container holds a label and one more child, usually text or table.

The following diagram shows the hierarchy within an SPV structure member more precisely. Names represent elements and <text> and <cdata> represent plain text and CDATA, respectively. Edges point from parent to child. Unlabeled edges indicate that the child appears exactly once; edges labeled with *, zero or more times; edges labeled with ?, zero or one times. Where possible, child elements are shown in the order they actually appear within a parent element.

heading
  +--?--> pageSetup
  |         +--> pageHeader +--> pageParagraph --> text --> <cdata>
  |         +--> pageFooter +--> pageParagraph --> text --> <cdata>
  +-----> label --?--> <text>
  +--*--> heading
  +--*--> container
             +-----> label --?--> <text>
             +--?--> text ---> html --> <cdata>
             +--?--> table
             |         +--?-- tableProperties
             |         |        +--> generalProperties
             |         |        +--> footnoteProperties
             |         |        +--> cellFormatProperties
             |         |        |      +--> caption -------> style
             |         |        |      +--> footnotes -----> style
             |         |        |      +--> rowLabelse ----> style
             |         |        |      +--> columnLabels --> style
             |         |        |      +--> data ----------> style
             |         |        |      +--> layers --------> style
             |         |        |      +--> title ---------> style
             |         |        |      +--> cornerLabels --> style
             |         |        +--> borderProperties
             |         |        |      +--> topInnerFrame
             |         |        |      +--> rightInnerFrame
             |         |        |      +--> horizontalDimensionBorderColumns
             |         |        |      +--> horizontalDimensionBorderRows
             |         |        |      +--> horizontalCategoryBorderColumns
             |         |        |      +--> leftInnerFrame
             |         |        |      +--> verticalDimensionBorderRows
             |         |        |      +--> titleLayerSeparator
             |         |        |      +--> verticalCategoryBorderRows
             |         |        |      +--> topOuterFrame
             |         |        |      +--> bottomInnerFrame
             |         |        |      +--> leftOuterFrame
             |         |        |      +--> dataAreaTop
             |         |        |      +--> verticalDimensionBorderColumns
             |         |        |      +--> dataAreaLeft
             |         |        |      +--> horizontalCategoryBorderRows
             |         |        |      +--> bottomOuterFrame
             |         |        |      +--> rightOuterFrame
             |         |        |      +--> verticalCategoryBorderColumns
             |         |        +--> printingProperties
             |         +----- tableStructure
             |                  +--?--> path ------> <text>
             |                  +-----> dataPath --> <text>
             +--?--> graph
             |         +--?--> dataPath --> <text>
             |         +-----> path ------> <text>
             +--?--> model
                       +--?--> ViZml --> <text>
                       +--?--> path ---> <text>
                       +--?--> pmmlContainerPath ---> <text>
                       +--?--> statsContainerPath --> <text>

The elements found in structure members are documented below. For each element, we note the possible parent elements and the element’s contents. The contents are specified as pseudo-regular expressions with the following conventions:

text

XML text content.

CDATA

XML CDATA content.

element

The named element.

(…)

Grouping multiple elements.

[x]

An optional x.

a | b

A choice between a and b.

x*

Zero or more x.

The following example shows the contents of a typical structure member for a DESCRIPTIVES procedure. A real structure member is not indented. This example also omits most attributes, all XML namespace information, and the CSS from the embedded HTML:

<?xml version="1.0" encoding="utf-8"?>
<heading>
  <label>Output</label>
  <heading commandName="Descriptives">
    <label>Descriptives</label>
    <container>
      <label>Title</label>
      <text commandName="Descriptives" type="title">
        <html lang="en">
<![CDATA[<head><style type="text/css">...</style></head><BR>Descriptives]]>
        </html>
      </text>
    </container>
    <container visibility="hidden">
      <label>Notes</label>
      <table commandName="Descriptives" subType="Notes" type="note">
        <tableStructure>
          <dataPath>00000000001_lightNotesData.bin</dataPath>
        </tableStructure>
      </table>
    </container>
    <container>
      <label>Descriptive Statistics</label>
      <table commandName="Descriptives" subType="Descriptive Statistics"
             type="table">
        <tableStructure>
          <dataPath>00000000002_lightTableData.bin</dataPath>
        </tableStructure>
      </table>
    </container>
  </heading>
</heading>

Next: , Up: SPSS Viewer File Format   [Contents][Index]