Perspector 3.1 XML Data Model – Data version 1.400

© 2007 Visual Exemplars Ltd

6 July 2007

This reference document describes the XML data model used by Perspector 3.1.

For enquiries about this document, please email support@perspector.com or visit www.perspector.com.

EXAMPLE

The following describes a frame containing a shiny, blue, up-pointing cone. The shape is is 100 “points” wide, 200 tall, and 100 deep (see the size attribute in Position description for an explanation of the units used). The shape is also positioned 50 “points” to the right of the frame’s center.

 

<Perspector majorVersion="1" minorVersion="400">

<Scene>

<Shape id="0" type="UpCone">

<Position position="50,0,0" size="100,200,100" />

<DisplayProperties>

<Fill color="#00007f" />

<Shine shininess="90" />

</DisplayProperties>

</Shape>

</Scene>

</Perspector>

ELEMENT HIERARCHY

ROOT ELEMENT: Perspector

Perspector

 Scene

  AnimationEffect

  BaseCamera [Camera]

  Camera

  Connector

   Area

    Point [Vertex]

   DisplayProperties

   ShapeArea

    Area

   SlideArea

    Area

  DefaultConnectorProperties [DisplayProperties]

  DefaultShapeProperties [DisplayProperties]

  DefaultTextFormat

  Freeform (and see ShapeObjBase)

  Group

  Shape (and see ShapeObjBase)

   Detail

  Slide

   DisplayProperties

   Position

DisplayProperties

 Fill

 Line

 Font

 Shine

(ShapeObjBase)

 DisplayProperties

 SimpleText

 Text

 Position

Position

 Transformation

  Rotate

   RotationOrigin

  Scale

  Translate

ATTRIBUTE TYPES

string

long

double

bool: "0" or "1"

color: "#RRGGBB" or "red, green, blue" (integer components)

vertex: "x,y,z" (doubles)

rotation triple: "y,x,z" (doubles)

matrix-n: n comma-separated doubles

ELEMENTS AND ATTRIBUTES

AnimationEffect

 

 amount [long] = "360"

Angle to spin, in degrees.

 autoReverse [bool] = "0"

Whether to perform a reverse of the animation at the end.

 duration [double] = "2.0"

Duration in seconds. It does not include the duration of any repeats or reverse action.

 smoothEnd [bool] = "0"

 

 smoothStart [bool] = "0"

 

 startPosition [long] = "0"

Angle to start the spin from, in degrees.

 type [string]
     "spinUp"
     "spinDown"
     "spinLeft"
     "spinRight"
     "spinCounterClockwise"
     "spinClockwise"

 

Area



An Area describes the location of the end of a connector. If the connector is attached to a slide or a shape, then a SlideArea or ShapeArea is used to describe the end point in relation to the slide or shape.

 position [vertex] = "0,0,0"

 

 projection [vertex] = "0,0,0"

For connectors that have more than 2 ends, this is used to calculate the position of the mid-point. The projection offset indicates the direction that the connector end is coming from. This could be the normal of the surface that the connector end is on.

 Point [Vertex] (0 or 4)

Corner vertices of the area.

Camera

 

 modelViewMatrix [matrix-16] = identity matrix

 

 perspectiveX [double] = "0"

 

 perspectiveY [double] = "0"

 

 roll [double] = "0"

 

 tilt [double] = "0"

 

Connector

 

 id [long]

This value must be unique among all items in the Scene.

 lastGroup [long] = "-1"

The previous parent group (used for regrouping).

 parentGroup [long] = "-1"

-1 if not in a group.

 type [long] = "4"
     1 = PathType
     2 = OneToManyType
     3 = RadialType
     4 = StraightType

All of the connectors created via the user interface are type 4. The other types of connectors might fail to be displayed.

 Area/SlideArea/ShapeArea (2 or more of any combination)

End points of the connector.

 DisplayProperties

 

Detail



This is a shape adjustment that alters the form of a shape.

 d [double] = "0.0"

Depth position. This is relative to the shape edges, from 0.0 to 1.0, but it isn’t limited to the shape boundaries.

 h [double] = "0.0"

Horizontal position. This is relative to the shape edges, from 0.0 to 1.0, but it isn’t limited to the shape boundaries.

 id [long]

0-based detail index.

 v [double] = "0.0"

Vertical position. This is relative to the shape edges, from 0.0 to 1.0, but it isn’t limited to the shape boundaries.

DisplayProperties

 

 Fill

 

  color [color]

Omitted if there is no fill color.

  opacity [double] = "1.0"

From 0.0 (transparent) to 1.0 (opaque).

 Font

 

  color [color]

Omitted if there is no font color.

 Line

 

  beginArrowheadStyle [long] = "1"
     1 = None
     2 = Arrow-head
     3 = Ball
     4 = Footprint

This value is used with connectors to describe the style of the 1st end point.

  color [color]

Omitted if there is no line color.

  endArrowheadStyle [long] = "1"
     1 = None
     2 = Arrow-head
     3 = Ball
     4 = Footprint

This value is used with connectors to describe the style of all of the end points execpt the 1st end point.

  opacity [double] = "1.0"

From 0.0 (transparent) to 1.0 (opaque).

  width [double] = "1.0"

 

 Shine

 

  color [color]

Omitted if there is no specular color.

  shininess [long] = "0"

From 0 (matte) to 100 (full shininess).

Freeform

 

 (same as ShapeObjBase plus...)

 

 closedPath [bool] = "0"

Note: this value cannot be changed via the UI.

 segmentString [string]

This value describes the form of the freeform shape. The format of this value is as follows.

List of all of the segments:
     "seg1,seg2,..."
Each segment is a list of points:
     "p1,p2,..."
Each point is in the form "x,y,t" where x, y [double] are the point co-ordinates and t [string] is the type:
     "-" first point in the segment
     "c" segment is a curve
     "l" segment is a straight line

Group

 

 id [long]

This value must be unique among all items in the Scene.

 isCurrentlyGrouped [bool] = "0"

 

 lastGroup [long] = "-1"

The previous parent group (used for regrouping).

 parentGroup [long] = "-1"

-1 if not in a group.

 primaryItem [long]

The ID of the primary item in the group (the primary item determines the orientation of the whole group).

Perspector

 

 majorVersion [long]

The major version of the Perspector data version. This is used to warn of possible incompatibilities:

If the XML majorVersion = the Perspector majorVersion, the minorVersion is used.

If the XML majorVersion < the Perspector majorVersion, Perspector might be able to convert the data.

If the XML majorVersion > the Perspector majorVersion, Perspector won’t be able to interpret the data.

 minorVersion [long]

The minor version of the Perspector data version. When the majorVersion is the same between the XML data and Perspector, the minorVersion is used:

If the XML minorVersion <= the Perspector minorVersion, Perspector will show the data without problem.

If the XML minorVersion > the Perspector minorVersion, Perspector will interpret some of the data, but the user will be warned that some data might not be shown correctly.

 Scene

 

Position

 

 position [vertex] = "0,0,0"

The center of the item’s position. This (and all other vertices) is measured in the approximate equivalent of points. This equivalence is only applicable for newly inserted or converted shapes, when the PowerPoint slide has the default slide-show size and is in landscape orientation.

 rotation [rotation triple] = "0,0,0"

Rotations angles around each global axis: y-axis, x-axis, z-axis. The rotations are applied in this order (Y, then X, then Z).

To rotate around the shape’s axis instead, use Rotate elements in a Transformation sequence.

 rotationUnits ["degrees", "radians"] = "degrees"

 

 size [vertex] = "100,100,100"

This is measured in the approximate equivalent of points. This equivalence is only applicable for newly inserted or converted shapes, when the PowerPoint slide has the default slide-show size and is in landscape orientation.

 Transformation

Transformation is a sequence of 0 or more transformations that will be applied to the Position. These values will not be stored.

Scene

 

 ambientLightStrength [double] = "0.75"

Strength of the ambient light.

In the UI:

 0.0  = Off

 0.35 = Low

 0.75 = Medium

 1.0  = High

 autosize [bool] = "0"

Whether or not to use automatic sizing of the frame.

 backgroundColor [color]

If this attribute is omitted, then the PowerPoint slide's background color will be used instead.

 frameLeft [double]

This is the previous position of the frame shape. It is used when autosize is 1.

 frameHeight [double]

This is the previous width of the frame shape. It is used in conjuction with frameWidth and frameOrientationIsPortrait.

 frameOrientationIsPortrait [bool]

This indicates the previous orientation of the slide that the frame shape is on. It is used in conjuction with frameWidth and frameHeight.

 frameTop [double]

This is the previous position of the frame shape. It is used when autosize is 1.

 frameWidth [double]

This is the previous height of the frame shape. It is used in conjuction with frameHeight and frameOrientationIsPortrait.

If frameWidth, frameHeight and/or frameOrientationIsPortrait are specified they are compared with the frame shape’s current dimensions to see if the frame shape has been resized. If so this will be used to rescale the viewport.

 hasTransparentBackground [bool] = "1"

 

 light1Strength [double] = "0.3"

Strength of light 1.

In the UI:

 0.0  = Off

 0.05 = Low

 0.3  = Medium

 1.0  = High

 light2Strength [double] = "0.0"

Strength of light 2.

 light3Strength [double] = "0.0"

Strength of light 3.

 light4Strength [double] = "0.0"

Strength of light 4.

 light1Direction [vertex] = "0.0,-0.4,1.0"

Position of light 1.

In the UI:

-1.5,  1.0, 1.0 = Top-left

 0.0,  1.0, 1.0 = Top-center

 1.5,  1.0, 1.0 = Top-right

-1.5, -0.4, 1.0 = Middle-left

 0.0, -0.4, 1.0 = Middle-center

 1.5, -0.4, 1.0 = Middle-right

-3.0, -3.0, 1.0 = Bottom-left

 0.0, -3.0, 1.0 = Bottom-center

 3.0, -3.0, 1.0 = Bottom-right

 light2Direction [vertex] = "0.0,-0.4,1.0"

Position of light 2.

 light3Direction [vertex] = "0.0,-0.4,1.0"

Position of light 3.

 light4Direction [vertex] = "0.0,-0.4,1.0"

Position of light 4.

 scaleX [double] = "1.0"

This can be used with scaleY to scale the viewport.

 scaleY [double] = "1.0"

This can be used with scaleX to scale the viewport.

 _preDataVersion_1_32_combinedViewport [bool] = "0"

Set this flag to emulate previous viewport resizing behaviour on data migrated from v1, where resizing the frame vertically stretches the viewport. It is recommended that this value is false.

 AnimationEffect (0 or 1)

Omitted if the scene is not animated.

 BaseCamera [Camera]

The base camera is used to reset the camera position.

 Camera

The camera defines the viewpoint for the scene.

 Connector (0 or more)

The connectors contained in the scene.

 DefaultConnectorProperties [DisplayProperties]

The default format to use for new connectors.

 DefaultShapeProperties [DisplayProperties]

The default format to use for new shapes.

 DefaultTextFormat

The default format to use for new text. The format is specified as an RTF text value of the DefaultTextFormat element.

 Freeform (0 or more)

The freeform shapes contained in the scene.

 Group (0 or more)

The groups contained in the scene.

 Shape (0 or more)

The non-freeform shapes contained in the scene.

 Slide (0 or more)

The slides contained in the scene.

Shape

 

 (same as ShapeObjBase plus...)

 

 textOffsetX [double] = "0.0"

The horizontal offset in points for text if useTextTexture is true. Positive values are to the right.

 textOffsetY [double] = "0.0"

The vertical offset in points for text if useTextTexture is true. Positive values are downward.

 type [string]
     General:
          "unknown"
          "Picture"
          "TextBox"
          "Freeform"
     Rectangles:
          "Rectangle"
          "RoundedRectangle"
          "SnipSingleCornerRectangle"
          "SnipSameSideCornerRectangle"
          "SnipDiagonalCornerRectangle"
          "SnipAndRoundSingleCornerRectangle"
          "RoundSignalCornerRectangle"
          "RoundSameSideCornerRectangle"
          "RoundDiagonalCornerRectangle"
     Basic Shapes:
          "Parallelogram"
          "Trapezoid"
          "Diamond"
          "RoundedRectangle"
          "Octagon"
          "IsoscelesTriangle"
          "RightTriangle"
          "Oval"
          "Hexagon"
          "Cross"
          "RegularPentagon"
          "FlatCan"
          "Cube"
          "Bevel"
          "FoldedCorner"
          "SmileyFace"
          "Donut"
          "NoSymbol"
          "BlockArc"
          "Heart"
          "LightningBolt"
          "Sun"
          "Moon"
          "Arc"
          "DoubleBracket"
          "DoubleBrace"
          "Plaque"
          "LeftBracket"
          "RightBracket"
          "LeftBrace"
          "RightBrace"
     3D Shapes:
          "Can"
          "Sphere"
          "Slice"
          "Cube3D"
          "TriangularPyramid"
          "SquarePyramid"
          "Wedge"
          "HorizontalCylinder"
          "RightCone"
          "LeftCone"
          "UpCone"
          "DownCone"
          "Ball"
          "Disk"
          "Donut3D"
          "Tablet"
          "Box"
     Block Arrows:
          "FlatRightArrow"
          "FlatLeftArrow"
          "FlatUpArrow"
          "FlatDownArrow"
          "FlatLeftRightArrow"
          "FlatUpDownArrow"
          "QuadArrow"
          "LeftRightUpArrow"
          "BentArrow"
          "UTurnArrow"
          "LeftUpArrow"
          "BentUpArrow"
          "CurvedRightArrow"
          "CurvedLeftArrow"
          "CurvedUpArrow"
          "CurvedDownArrow"
          "StripedRightArrow"
          "NotchedRightArrow"
          "Pentagon"
          "Chevron"
          "RightArrowCallout"
          "LeftArrowCallout"
          "UpArrowCallout"
          "DownArrowCallout"
          "LeftRightArrowCallout"
          "UpDownArrowCallout"
          "QuadArrowCallout"
          "CircularArrow"
     3D Arrows:
          "RightArrow"
          "LeftArrow"
          "UpArrow"
          "DownArrow"
          "LeftRightArrow"
          "UpDownArrow"
     Flowchart:
          "Process"
          "AlternateProcess"
          "Decision"
          "Data"
          "PredefinedProcess"
          "InternalStorage"
          "Document"
          "Multidocument"
          "Terminator"
          "Preparation"
          "ManualInput"
          "ManualOperation"
          "Connector"
          "OffpageConnector"
          "Card"
          "PunchedTape"
          "SummingJunction"
          "Or"
          "Collate"
          "Sort"
          "Extract"
          "Merge"
          "StoredData"
          "Delay"
          "SequentialAccessStorage"
          "MagneticDisk"
          "DirectAccessStorage"
          "Display"
     Stars and Banners:
          "Explosion1"
          "Explosion2"
          "4PointStar"
          "5PointStar"
          "8PointStar"
          "16PointStar"
          "24PointStar"
          "32PointStar"
          "UpRibbon"
          "DownRibbon"
          "CurvedUpRibbon"
          "CurvedDownRibbon"
          "VerticalScroll"
          "HorizontalScroll"
          "Wave"
          "DoubleWave"
     Callouts:
          "RectangularCallout"
          "RoundedRectangularCallout"
          "OvalCallout"
          "CloudCallout"
          "LineCallout1"
          "LineCallout2"
          "LineCallout3"
          "LineCallout4"
          "LineCallout1AccentBar"
          "LineCallout2AccentBar"
          "LineCallout3AccentBar"
          "LineCallout4AccentBar"
          "LineCallout1NoBorder"
          "LineCallout2NoBorder"
          "LineCallout3NoBorder"
          "LineCallout4NoBorder"
          "LineCallout1BorderAndAccentBar"
          "LineCallout2BorderAndAccentBar"
          "LineCallout3BorderAndAccentBar"
          "LineCallout4BorderAndAccentBar"

 

 useTextTexture [bool] = "1"

True if text is wrapped around the shape (required to display Unicode characters).

 Detail (0 or more)

The number of details depends on the type of the shape.

ShapeArea



A ShapeArea describes the end of a connector that is connected to a Shape or FreeForm.

 shapeID [long]

The ID of the shape that this connector end is connected to.

 site [long] = "-1"

0-based index of connection site on the shape, or -1 if not connected. The number and positions of the connections sites depend on the type of shape.

 Area

The physical location of the end of the connector.

This value is automatically generated, and does not need to be specified.

(ShapeObjBase)



This is not an element - the attributes and child elements described here are shared by Shape and Freeform.

 horizontalFlip [bool] = "0"

Whether the shape is horizontally flipped.

 id [long]

This value must be unique among all items in the Scene.

 lastGroup [long] = "-1"

The previous parent group (used for regrouping).

 parentGroup [long] = "-1"

-1 if not in a group.

 pictureID [string] = ""

If specified, this identifies a picture to use as the shape's fill.

If the value is prefixed with "_file ", e.g. "_file C:\my pics\pic.bmp", then the picture file will be used. The path to the file may be relative to the presentation file, e.g. "_file ..\my pics\pic.bmp".

Otherwise, the value identifies a picture that is stored as a picture shape on the Perspector Data Slide. The picture shape must have a shape tag

with the name "Perspector-Picture", and a value that is the picture's ID.

 pictureWrap [bool] = "0"

Whether a picture is shown on all sides of the shape.

 verticalFlip [bool] = "0"

Whether the shape is vertically flipped.

 DisplayProperties

 

 Position

 

 SimpleText

Plain text. This is an alternative to specifying fully formatted text as RTF in the Text element.

  fontname [string] = "Arial"

 

  fontsize [long] = "18"

Font size in points.

  justification [string] = "center"
     "left"

     "center"

     "right"

Horizontal alignment of the text.

  text [string] = ""

Although a simple text string can be used here, it is also possible to use basic RTF formatting, e.g. "Here is some {\b bold} text".

  verticalAlignment [string] = "middle"
     "top"
     "middle"

     "bottom"

Vertical alignment of the text relative to the shape.

 Text

Formatted RTF text. This is an alternative to specify text as a plain value (without RTF formatting) in the SimpleText element.

The text value is contained in this element, e.g. <Text>Here is some text</Text>. It is not specified as an attribute value.

  verticalAlignment [string] = "middle"
     "top"
     "middle"

     "bottom"

Vertical alignment of the text relative to the shape.

Slide



This is a slide placeholder. It can be empty or it can contain a slide image.

 cropX1 [long] = "0"

Used if isCropped is 1.

 cropX2 [long] = "0"

Used if isCropped is 1.

 cropY1 [long] = "0"

Used if isCropped is 1.

 cropY2 [long] = "0"

Used if isCropped is 1.

 height [long] = "540"

Height of the source PowerPoint slide, in pixels.

 id [long]

This value must be unique among all items in the Scene.

 includeBackground [bool] = "1"

 

 includeMaster [bool] = "1"

This is ignored if includeBackground is 0.

 isCropped [bool] = "0"

 

 lastGroup [long] = "-1"

The previous parent group (used for regrouping).

 parentGroup [long] = "-1"

-1 if not in a group.

 pictureMaskID [string] = ""

Refers to a picture to use as a mask.

 pictureID [string] = ""

If a static image of the source PowerPoint slide has been generated, this is the ID of the picture shape on the Perspector Data Slide. This can also be the ID of any picture on the Perspector Data Slide, or the filename of a picture file.

 ppSlideID [long] = "-1"

The ID of the source PowerPoint slide.

-1 is an empty slide placeholder.

 width [long] = "720"

Width of the source PowerPoint slide, in pixels.

 DisplayProperties

 

 Position

 

SlideArea



A SlideArea describes the end of a connector that is connected to a Slide.

 b [long]

Bottom of the connection area on the slide, in pixels.

 l [long]

Left of the connection area on the slide, in pixels.

 r [long]

Right of the connection area on the slide, in pixels.

 slideID [long]

The ID of the slide that this connector end is connected to.

 t [long]

Top of the connection area on the slide, in pixels.

 Area

The physical location of the end of the connector.

This value is automatically generated, and does not need to be specified.

Transformation



The child elements describe a set of transformations that will be applied in the order that they are given.

 Rotate (0 or more)

Rotate around any axis.

  angle [double]

Rotating in the positive direction around these axes perform the following:
     x - tilt down
     y - tilt right
     z - rotate right

  angularUnits ["degrees", "radians"] = "degrees"

 

  axis [vertex, "x", "y", "z"]

The direction of the axis to rotate around. This is used in conjunction with RotationOrigin's vertex attribute.

"x", "y", "z" are the shape's axes.

  RotationOrigin

 

   relative [bool] = "1"

Whether vertex is relative to the item being rotated or not.

   vertex [vertex] = "0,0,0"

The origin of the axis to rotate around. The rotation occurs around the line from (this vertex) to (this vertex plus the axis offset).

 Scale (0 or more)

 

  factor [double] = "1.0"

Increase (> 1.0) or decrease (< 1.0) the item's dimensions by the specified factor.

 Translate (0 or more)

 

  relative [bool] = "1"

Whether vertex is relative to the item being moved or not. If true, the x, y, z of the vertex are values along the x-axis, y-axis, z-axis of the item, respectively.

  vertex [vertex]

Move the item.

Vertex

 

 vertex [vertex] = "0,0,0"

This attribute can be used as an alternative to the x, y, z attributes.

 x [double] = "0.0"

 

 y [double] = "0.0"

 

 z [double] = "0.0"