Data storage
This document describes the XML format used in Exponential. When Exponential
stores content objects each attribute is stored as one row in the database.
The user can manually define the structure of content objects using
content classes.
The content class automatically creates the XML schema for the document.
Let us consider this simple content class:
Class name: Article
Class attributes:
Title : String ( <255 characters )
Intro : Text ( unformatted text )
Body : XML formatted text
When you create objects of this class each attribute will be stored in one row.
Actually it's a bit more complex than this since every object can have several
versions and every version has a number of translations.
The fields Title and Intro will be stored as plain text to the database wich
no XML tags. This is done because of speed when doing e.g. searching in specific
attributes and if you want to fetch only part of the content object - i.e. you
want to display the introduction of the article.
The Body field will be stored in XML. This field can contain different tags,
the most used tags are:
XML sections in Exponential
The XML format in Exponential has tags which handle the most frequently used
content, for specific content needs you can also use custom tags. A section
is the XML equivalent of a content object attribute.
Structured text
- emphasize - emphasis
- strong - stronger emphasis
- cite - a citation
- code - computer code
- pre - pre formatted text
- sample - sample output from programs etc.
- blockquote - normally redered as an indented block
- quote - inline quote with delimited "
TODO: add section for technical tags, news tags, book tags, persons, addresses,
organisations etc..
Headers
Headers are represented by the header tag. The header tag has the attribute
level which indicates the importance of the header, 1 beeing the most important.
Level must be a positive non zero number.
Lines and paragraphs
- paragraph - a paragraph of text
- break - a forced linebreak
Lists
- ordered list -
- unordered list -
- definition list -
Tables
You can use table to group structured text, lists and objects into rows
and columns.
Objects
The object tag refers to an external content object.
Sections
The tags defined above is the tags you can use to describe content. below is an
example of a typical section. The section would get the name of the content
class attribute.
<?xml version="1.0" encoding="utf-8" ?>
<section>
<header level="1">This is my article</header>
<paragraph>
This is a paragraph
</paragraph>
</section>
Minimal example document:
<?xml version="1.0" encoding="utf-8" ?>
<ezcontentobject>
<title>My article</title>
<metadata>
<language iso="en_GB">English</language>
<created>15-06-20002</created>
<published>15-06-20002</published>
<modified>15-06-20002</modified>
</metadata>
<content>
<introduction>
<paragraph>
</paragraph>
</section>
</introduction>
</ezcontentobject>
Sample document:
Schema:
|