Back to development sectionEdit Introduction
Sider document is not necessary a file on the computer or a record in the database. It's a specific piece of information. If there's separate, but related information it should go to a separate document and a relationship between the two documents is created.
A document can be embedded or referenced inside other documents. Often the document that the user sees is a collection of related small document all gathered together inside one document.
The point of having large collection of small documents is to promote reuse of common data structures that exist in the world. For example a person name often consists of a first name and a last name. Sometimes there's a title or middle name, but all those cases has to be solved only once. After that the structure can be reused everywhere a person name is required.
More complicated example reuses an abstract structure, a tree or a list. In this case a list can be adopted to be a list of person names, or addresses, or a list of custom documents (list of customers that is made up of a person name and address).
Edit Document variations
Each document can be either concrete or embedded. If the document is embedded, it is placed inside of another document and to the end user often doesn't appear to be a separate document.
Concrete document is the document user sees and can be saved to a separate file. Usually view is generated for the concrete document. The same view should handle all embedded documents and correctly show relationship between parent document and embedded document.
Edit Main structure
Each document is an XML document. Internal structure can be custom (and is described by the type). That structure needs to be wrapped inside a specific standard element for Sider to recognize embedded documents (one of the major goals is to promote information structure reuse) so that document specific operations could function correctly.
"document" element is the wrapper. It is in the document type's namespace. Its attribute show document type ID and version.
>
| Node Name | Parent node name | Description | Value |
| x:document | Document element or (if current document is embedded) appropriate parent element as specified by the parent document's type schema | Wraps internal document structure. | Valid nodes |
| @type | x:document | Attribute with document type ID | String GUID |
| @typeVersion | x:document | Attribute with document type version | "x.x.x.x" versions string |
Edit Example
<siderHtmlTree:document
type="fa706485-6b3b-438b-9320-de21872011b8"
typeVersion="0.5.0.0"
xmlns:siderHtmlTree="http://www.emeraldhand.com/Sider/HtmlTree/v20060325">
<siderProperties:properties
xmlns:siderProperties="http://www.emeraldhand.com/Sider/properties/v20060323">
...
</siderProperties:properties>
...
</siderHtmlTree:document>
Edit Document properties
Sider documents support properties. Some of the properties are system and are generated when the document is created. Other properties are custom and can be created and edited by the user. Most of the properties are described using standard structure and are wrapped by "
{siderProperties:properties}" element. The only exceptions are type and type version properties described above.
Each property has a set of flags that determine access permissions to the property. Most of the system properties are read only. Some (such as document title) will let the user change property value.
All of the system properties are required for the application to be able to load and work with the document correctly. Embedded documents are only required to have "
type" and "
typeVersion" properties.
>
| Node Name | Parent node name | Description | Value |
| siderProperties:properties | x:document | Holds most of the document properties. | Array of "{siderProperties:property}" elements. |
| siderProperties:property | siderProperties:properties | Holds single document property. | Attributes with property value, description, flags, etc. |
| @name | siderProperties:property | Property name. | String |
| @value | siderProperties:property | Property value. | String, date, GUID, version, or View ID. |
| @description | siderProperties:property | Property description. | String |
| @read | siderProperties:property | Read flag. Property value can be accessed only if this is "true". | true or false |
| @write | siderProperties:property | Write flag. Property value can be changed only if this is "true". | true or false |
| @edit | siderProperties:property | Edit flag. Property flags can be changed only if this is "true". | true or false |
| @delete | siderProperties:property | Delete flag. Property can be deleted only if this is "true". | true or false |
Example:
<siderProperties:properties
xmlns:siderProperties="http://www.emeraldhand.com/Sider/properties/v20060323">
<siderProperties:property
name="Title" value="New Document" description="Document title."
read="true" write="true" edit="false" delete="false"/>
<siderProperties:property
name="Subject" value="Misc" description="Document subject."
read="true" write="true" edit="false" delete="false"/>
<siderProperties:property
name="ID" value="2e356056-eb2b-4dab-aceb-ea6b75dfe522"
description="Unique document ID."
read="true" write="false" edit="false" delete="false"/>
<siderProperties:property
name="Author" value="Unknown" description="Original creator of the document."
read="true" write="true" edit="false" delete="false"/>
<siderProperties:property
name="Comments" value="" description="Custom comments."
read="true" write="true" edit="false" delete="false"/>
<siderProperties:property
name="Default View" value="5a9d0fe8-90d3-47f4-9fde-79e53d194b62"
description="View in which the document is shown by default when it is first opened."
read="true" write="false" edit="false" delete="false"/>
<siderProperties:property
name="Version" value="1"
description="Document version. Format is [MajorVersion.MinorVersion]."
read="true" write="true" edit="false" delete="false"/>
<siderProperties:property
name="Created" value="2006-04-10T20:49:51Z"
description="Date and time when the document was created."
read="true" write="false" edit="false" delete="false"/>
<siderProperties:property
name="Modified" value="2006-04-10T20:50:01Z"
description="Date and time of the last time the document was opened and modified."
read="true" write="false" edit="false" delete="false"/>
</siderProperties:properties>