XML Format
This appendix describes the XML format of the objects in the impression.persistence namespace.
Lesson
The Lesson object's XML format is:
<ppc name="properties">…</ppc>
<maps default=[default]>…</maps>
<storyboards>…</storyboards>
</lesson>
Elements
The Lesson object's XML format has the following elements:
Element | Description |
---|---|
<lesson> | Root element. The lessonID, title, identifier, documentID, and classification attributes contain the values of the lessonID, title, identifier, documentID, and classification properties, respectively. |
<ppc> | A PersistedPropertiesCollection XML element containing the lesson's properties collection. |
<maps> | A LessonMapCollection XML element containing the lesson's maps collection. |
<storyboards> | A StoryboardCollection XML element containing the lesson's storyboards collection. |
LessonMapCollection
The LessonMapCollection object's XML format is:
<map...
<map...
...
</lesson>
Elements
The LessonMapCollection object's XML format has the following elements:
Element | Description |
---|---|
<maps> | Root element. The default attribute contains the value of the LessonMap object to use as the collection's defaultMap. |
<map> | A LessonMap XML element. |
LessonMap
The LessonMap object's XML format is:
<item sbid="00000000-0000-0000-0000-000000000001" />
<item sbid="00000000-0000-0000-0000-000000000002" />
<item sbid="00000000-0000-0000-0000-000000000003">
<item sbid="00000000-0000-0000-0000-000000000004" />
<item sbid="00000000-0000-0000-0000-000000000005" />
...
</item>
<item sbid="00000000-0000-0000-0000-000000000006" />
</map>
Elements
The LessonMap object's XML format has the following elements:
Element | Description |
---|---|
<map> | Root element. The name attribute contains the value of the object's name property. |
<item> | Individual storyboard reference. The sbid attribute is a String containing the storyboard unique identifier (the sbid property) for the storyboard at item's location. |
Remarks
The hierarchical order of the <item> elements defines the structure of the map. A nested <item> element will appear as a child of the parent <item> element.
Note that the LessonMapController object's labelMap method will add an additional attribute to each <item> element.
StoryboardCollection
The StoryboardCollection object's XML format is:
<storyboard...
<storyboard...
...
</storyboards>
Elements
The StoryboardCollection object's XML format has the following elements:
Element | Description |
---|---|
<storyboards> | Root element. |
<storyboard> | A Storyboard XML element. |
Remarks
No ordering is implied for <storyboard> elements.
Storyboard
The Storyboard object's XML format is:
title=[storyboard title]
identifier=[storyboard identifier]
type=[storyboard type]
classification=[classification]
shortid=[short id]>
<ppc name="properties">…</ppc>
<cec name="children">…</cec>
</storyboard>
Elements
The Storyboard object's XML format has the following elements:
Element | Description |
---|---|
<storyboard> | Root element. The sbid, title, identifier, type, classification, and shortID attributes contain the values of the sbid, title, identifier, sbType, classification, and shortID properties, respectively. |
<ppc> | A PersistedPropertiesCollection XML element containing the storyboard's properties collection. |
<cec> | A ChildElementCollection XML element containing the storyboard's children collection. |
Remarks
If identifier is "", it may be omitted..
ChildElementCollection
The ChildElementCollection object's XML format is:
<ce...
<ce...
...
</cec>
Elements
The ChildElementCollection object's XML format has the following elements:
Element | Description |
---|---|
<cec> | Root element. The name attribute contains the value of the object's name property. |
<ce> | A ChildElement XML element. |
Remarks
A ChildElementCollection is an ordered collection of ChildElement objects. Elements are ordered within the object in the same order in which they appear in the XML.
ChildElement
The ChildElement object's XML format is:
[persisted property value]
[persisted property value]
...
</ce>
Elements
The ChildElement object's XML format has the following elements:
Element | Description |
---|---|
<ce> | Root element. The name and type attributes contain the values of the name and elementType properties, respectively. |
[persisted property value] | Individual persisted property value. |
Remarks
A ChildElement object is a superset of a PersistedPropertiesCollection object. For more information about persisted property values in XML, see the section on PersistedPropertiesCollection XML, below.
PersistedPropertiesCollection
The PersistedPropertiesCollection object's XML format is:
[persisted property value]
[persisted property value]
...
</ppc>
Elements
The PersistedPropertiesCollection object's XML format has the following elements:
Element | Description |
---|---|
<ppc> | Root element. The name attribute contains the value of the name property. |
[persisted property value] | Individual persisted property value. |
Property Elements
Individual persisted property values can be one of any number of types, as listed next.
Boolean property. value contains the Boolean value of the property.
<floatProp name=[element name] value=[element value] />
Number properties. value contains either the integer (intProp) or floating-point (floatProp) value of the property.
String property. The property value is stored as the inner text of the <stringProp> element.
ColorData property. value contains the value of the property, in HTML color format.
bold=[value] italic=[value] underline=[value]/>
FontData property. The familyName, emSize, bold, italic, and underline attributes all identify the values passed to the FontData constructor.
width=[value] height=[value]/>
Rectangle property. The left, top, width, and height attributes all identify the values passed to the Rectangle constructor.
<description>[file description]</description>
<source>[source files information]</source>
</assetProp>
AssetData property. The filename attribute contains the value of the filename property. If the <description> element is present, the inner text of the element is used for the value of the description property. If the <source> element is present, the inner text of the element is used for the value of the source property.
LocationData property. The from, to, and map attributes all identify the values passed to the LocationData constructor.
PersistedPropertiesCollection property. The data for the collection is stored as the child of the <ppcProp> element, and is stored in PersistedPropertiesCollection (where <ppc> is the root element) XML format.
ChildElementCollection property. The data for the collection is stored as the child of the <cecProp> element, and is stored in ChildElementCollection (where <cec> is the root element) XML format.
Encoded Elements
Any element can be base64-encoded to obfuscate content and prevent casual viewing. The Impression CCT can encode persisted properties that relate to questions, including (some) questions, answers, and distractors, as well as feedback and remediation messages. The format for a base64-encoded property is:
Where [element value] is a Base64-encoded string containing the string
representation of one of the property element XML formats listed above.
If the enctype
attribute is present and contains the value utf8
, then the
string data was created using a "UTF8 byte-encoded" version of the source
data. Support for the enctype
attribute was added to all
Impression components (including the CCT, the dev kits, and the Connect SDK)
starting with the first 2015 releases.
Remarks
No ordering is implied within a PersistedPropertiesCollection XML element.