|
HyperContent is capable of managing any type of file that has an associated MIME type. MIME types are globally configured in the properties file "ContentTypes.xml": this file must contain a declaration for any MIME type you want to use in a HyperContent Project. Here is a sample content type declaration:
The root level tag of a content-type declaration, "content-type", has three attributes:
-
type: either the preferred or only mime type for this content
-
label: human-readable name for an instance of this content type
-
icon: the location of a file (relative to the web application root) representing an icon for this content type
(a generic blank icon is provided at "media/edu/columbia/hypercontent/doc_blank.gif")
There are four tags which may appear inside a content-type declaration:
-
equivalent: specifies an alternate mime type for the same content
-
file-extension: specifies a file extension associated with this content type. If there is more than one, one should have the attribute preferred="true" to indicate it is the preferred extension.
-
editor: the key of an authoring tool, as specified in Editors.xml, which should be a global default for this content type. Multiple editors can be configured, and will appear in the order listed. Default editors can be overridden within a project's definition file.
-
word-loader: (not shown) has a single attribute "class" used to specify an implementation of the IWordLoader API that can be used to expose a file's content to the spell checker.
Content types are used to configure the contents of resource directories in HyperContent projects; see the chapter "Non-XML Content" for more information.
|
| |