file (Domino DTD)

Represents a file object attached to or embedded in a Notes document.

Containment Hierarchy

Contained by: <object>

Contains: <created>, <modified>, <filedata>

Syntax

<!ELEMENT file ( created, modified, filedata )>

Content

created, modified, filedata

Contains <created> and <modified> date information, followed by a <filedata> element.

Attributes

hosttype

(%file.hosttype;)

#REQUIRED

compression

(%file.compression;)

"none"

desiredcompression

%string;

#IMPLIED

flags

(%file.flags;)

#IMPLIED

attribute

(%file.attributes;)

#IMPLIED

encoding

(%file.encoding;)

"none"

name

%tstring;

#IMPLIED

application

%string;

#IMPLIED

type

%string;

#IMPLIED

resourcestart

%integer;

#IMPLIED

resourcesize

%integer;

#IMPLIED

>

application

Application name for Macintosh file attachments.

attribute

Properties of the attached file. Can be any of the attributes listed in the %file.attributes; entity.

compression

Method used to compress the attached file. Can be any of the methods listed in the %file.compression; entity.

desiredcompression

Only applies if you are exporting a file element whose original encoding is Huffman. This enables non-Notes tools to access the filedata without the Huffman decompression algorithm. When importing a file element, the only acceptable value for this attribute is 'huffman' and the compression attribute must be equal to 'none.'

encoding

Type of encoding to use to store the file attachment. Can be any of the style listed in the %file.encoding; entity.

flags

Defines the methods to use to secure the file. Can be any of the options listed in the %file.flags; entity.

hosttype

Identifies the origin of the file. Can be any of the options listed in the %file.hosttype; entity.

name

Name of the file, such as image.jpg. The name begins with EXT if the hosttype is bytearrayext and STG if the hosttype is bytearraypage.

resourcesize

Size of the resource fork of a Mac attachment or of HPFS' Extended Attributes (free-form information attached to a file.)

resourcestart

Start of a resource fork of a Mac attachment or of HPFS' Extended Attributes.

type

Type of file. This attribute applies to files from Macintosh operating systems only.

Defined entities for <file> element.

The %file.attributes; entity defines the different attributes associated with a file.

Syntax:

<!ENTITY % file.attributes "readonly | private ">

private

.

readonly

.

The %file.compression; entity defines the different ways a file can be compressed for storage.

Syntax:

<!ENTITY % file.compression "none | huffman | lz1 ">

huffman

Huffman coding is an encoding method developed by David Huffman, which varies the length of the encoded symbol in proportion to its content. It also specifies that no code can be a prefix to another code, allowing for the complete set of codes to be represented as a binary tree. All Huffman compressed files are uncompressed on export and compressed again on import.

lz1

LZ1 compression handles a limited window of the file at a time, creating a dictionary of repeating byte patterns. It does not save the dictionary but, instead, uses it to encode the attachment on the fly.

none

Specifies that the file is not compressed.

The %file.encoding; entity defines the different ways a file can be encoded for security purposes.

Syntax:

<!ENTITY % file.encoding "none | base64 | quotedprintable | uuencode | unknown ">

base64

File format that uses sixty-four ASCII characters to encode the six-bit binary data values zero through sixty-three.

none

Indicates that the file is not encoded.

quotedprintable

.

unknown

The file is encoded using an unrecognized format or protocol.

uuencode

Universal protocol that converts files into a series of 7-bit ASCII characters for transmission over the internet. This protocol is used to transfer files between different platforms such as UNIX, Windows, and Macintosh. Uuencoding is used mostly for sending and receiving email attachments.

The %file.flags; entity defines the different types of flags assigned to a file to determine how it can be accessed.

Syntax:

<!ENTITY % file.flags "sign | storedindoc ">

sign

Specifies that the document or note must be signed by the database administrator before the file's data can be accessed.

storedindoc

Specifies that the file's data is stored in the document.

The %file.hosttype; entity defines the different types of origins a file can have.

Syntax:

<!ENTITY % file.hosttype "msdos | mac | hpfs | bytearrayext | bytearraypage | stream | link | unknown ">

The following file attachment types originated from:

bytearrayext

OLE2 file.

bytearraypage

OLE2 file.

hpfs

link

A named element to which this file represents a resource link.

mac

MacIntosh operating system.

msdos

DOS (Windows)

stream

Binary private stream.

unknown

Indicates that the file attachment is a type that is unrecognized.