Properties
File [thout_package.properties]
A
Thout package is a volume of content, which is defined in a single XML file. We
will call this the package XML file.
[example.jar]
example.xml
thout_package.properties
stylesheet.css
[images]
image1.gif
image2.gif
A package consist of several files zipped into a jar file.
Note: A true jar file contains a manifest, however a manifest is not required when creating Thout packages. This allows you to simply zip the files and rename the extension from .zip to .jar.
A package should include one root .xml file. The name of the file is not currently important. The xml file should be well formed.
A property sheet should be included with each package. For DRM encrypted packages, the property file is not encrypted which allows the package properties to be read without having to decrypt the file. The property file is simply a text file in the following format.
name: Example Package
revision: 1.0
author: John Doe
publisher: Osoft
copyright: regx 2005
license: NA
packaged_by: John Doe
stylesheet: example.css
toc_background_color:
#F1F0FF
Currently only the name and revision are required.
A package can include resource files in addition to the package XML file. For instance, it may include Jpeg or .gif graphic files. The relative URL for an included image, as referenced from the package XML file, is the path from the root of the jar file for example <img src="images/image1.gif>.
A package XML file always contains a
root pkg:package tag. Other tags may be nested inside the content elements of
this tag, including tags from the built in "package:" and
"books:" namespaces, and HTML tags.
The pkg:package tag is required. It's attributes are
• name - Package Name
• revision -identifies version
number if there are multiple versions
• xmlns -
The xml namespace definition. You should list here all of the schemas for the
content type namespaces used in the package, "pkg/package" is
required. "html" is implied if there is no namespace prefix.
The package elements are
• author - the package author. There
may be more than one
• publisher
- the package publisher. There may be more than one
• content -
holds the actual package content.
The package content are navigated by
a table of contents outline that appears in the left hand "browse"
panel of the Thout Reader. The Thout Reader builds this table of contents by
reading outline tags, which enclose the content pages. Outline tags must
contain two attributes - an OutlineName which specifies the text that appears
in the outline, and an id, which is a unique id string within the package. The
outline id's are used as URL's to identify locations in the text for linking
and annotation.
Note: tag names are case sensitive
This tag
defines the table of contents displayed in the browse pane and has the
following attributes:
o OutlineName - the name that will appear in the outline
o ID - an ID string, unique inside the package
HTML tags can be used in the content
inline. HTML tags can have an html: prefix, or they can omit this, as the html:
namespace is a default for content in the package.
Links can be inserted in content by using the standard HTML link tag, <a href="destination URL">. Currently, the Thout Reader supports two types of link URL's, for Web pages and Thout packages. A standard "http:" URL will invoke a Web browser when the user clicks a link. A URL of the form href="pkg://packagename/ TagID=id" will go to the package and outline ID that is specified. A URL of the form href="id" is a relative package URL, and it links to the specified outline ID in the same package.
When
developing css stylesheets you can overide the stylesheet specified in the
package by placing a css named osoft_dev.css in your windows temp
directory.