<!--
===================================================================
                        domino_7_0_M4.dtd

This DTD describes the structure of DXL, the Domino XML Language,
for Notes/Domino version 7.0 Milestone 4.

Copyright (c) 1999-2004 IBM.
All rights reserved.

NOTE:

Some miscellaneous types of data that can appear only in design-
element notes of a Domino database are not yet handled by the
current versions of the DXL exporter and importer programs (for
example, custom datetime information in view notes).  If a specific
type of Domino data is defined in this DTD, then the DXL exporter
and importer programs can handle it and, conversely, if a specific
type of Domino data is not defined in this DTD, then those programs
cannot handle it yet.

===================================================================
-->

<!-- ******************************************************* -->
<!-- * Common                                              * -->
<!-- ******************************************************* -->

<!-- **** Elements **** -->

<!ELEMENT created ( datetime )>

<!ELEMENT modified ( datetime )>

<!-- **** Types **** -->

<!ENTITY % keywords.ui "
    dialoglist |
    checkbox |
    radiobutton |
    combobox |
    listbox
    ">

<!ENTITY % keywords.borders "
    none |
    single |
    inset
    ">

<!-- ******************************************************* -->
<!-- * Basic Types                                         * -->
<!-- ******************************************************* -->

<!ENTITY % boolean.choices "
    true |
    false
    ">

<!ENTITY % boolean "( %boolean.choices; )">

<!ENTITY % hex "CDATA">

<!ENTITY % integer "CDATA">

<!ENTITY % number "CDATA">

<!ENTITY % replicaid "CDATA">

<!ENTITY % dbid "CDATA">

<!ENTITY % float "CDATA">

<!-- NOTEIDs are 4-8 hex chars -->

<!ENTITY % noteid "CDATA">

<!-- UNIDs are 32 hex chars -->

<!ENTITY % unid "CDATA">

<!-- A string that can be translated (into another natural language). -->

<!ENTITY % tstring "CDATA">

<!-- A string that must not be translated into another natural language -->

<!ENTITY % string "CDATA">

<!--
tokens is used when an attribute can have zero or more token values separated
by spaces. XML has no way to express this (NMTOKENS can't be empty).
-->

<!ENTITY % tokens "CDATA">

<!-- Binary data is encoded Base64 as specified by MIME. -->

<!ENTITY % binary "( #PCDATA )">

<!-- A Uniform Resource Identifier -->

<!ENTITY % uri "CDATA">

<!--
Domino TIMEDATEs are represented in ISO8601 basic format, for example: 
    19990713T060306,52+05
TIMEDATEs can have just a time, or just a date. These use only the part
of the ISO8601 representation that are appropriate:
    T060306,52
    19990713
-->

<!ELEMENT datetime ( #PCDATA )>

<!-- Attributes for <datetime>:
    dst:            was daylight savings in effect when this time was recorded?
-->
<!ATTLIST datetime
    dst             %boolean;      "false"
    >

<!-- A person's name (or other name used in authorization). -->

<!ELEMENT name ( #PCDATA )>

<!--
This entity describes the fixed attribute that can appear on any of the potential
root elements in the DTD.  This is not actually referenced in the DTD since it is
an XML-defined attribute.
-->

<!ENTITY % root.fixed.attrs "
    xmlns           CDATA          #FIXED 'http://www.lotus.com/dxl'
    ">

<!--
This entity describes the attributes that can appear on any of the potential
root elements in the DTD.
-->

<!-- Attributes:
    version:        Example: The exporter on the first release of Domino 6 would output version='6.0'
    maintenanceversion:
                    Example: The exporter on Domino maintenance release 6.0.1b would output version='6.0' maintenanceversion='1.2', where the 'b' is represented by '.2'
    milestonebuild: Example: The exporter on the seventh milestone build of Domino 6.0 would output version='6.0' milestonebuild='7'
-->

<!ENTITY % root.attrs "
    version         %float;        #IMPLIED
    maintenanceversion
                    %float;        #IMPLIED
    milestonebuild  %number;       #IMPLIED
    replicaid       %replicaid;    #IMPLIED
    %root.fixed.attrs;
    ">

<!--
Holds a hexadecimal version of any character outside of these values:
Char := #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
http://www.w3.org/TR/REC-xml#charsets
-->

<!ELEMENT nonxmlchar EMPTY>
<!ATTLIST nonxmlchar
    value           %hex;          #IMPLIED
    >

<!-- ******************************************************* -->
<!-- * Note Types                                          * -->
<!-- ******************************************************* -->

<!ENTITY % design.elements "
    form |
    subform |
    page |
    frameset |
    view |
    folder |
    sharedfield |
    sharedactions |
    imageresource |
    appletresource |
    agent |
    agentdata |
    scriptlibrary |
    databasescript |
    helpusingdocument |
    helpaboutdocument |
    dataconnection
    ">

<!ENTITY % note.types "
    note |
    document |
    profiledocument |
    %design.elements;
    ">

<!-- ******************************************************* -->
<!-- * Databases                                           * -->
<!-- ******************************************************* -->

<!ENTITY % database.types "
    standard |
    library |
    addressbook |
    lightaddressbook |
    multidbsearch |
    portfolio |
    imapproxy |
    newsproxy |
    subscriptions |
    mailbox |
    personaljournal |
    mailfile
    ">

<!ELEMENT database ( databaseinfo?, acl?, fulltextsettings?, launchsettings?, ( %note.types; )* )>

<!-- Attributes for <database>:
    fromtemplate:   The name of the template this database inherits from.
    showinopendialog:
                    When true, database appears in database open's database dialogbox
    advancedtemplate:
                    If true, list as an advanced template in the New Database dialog.  
    markmodifiedunread:
                    If true, modified documents appear unread
    multidbindexed: If true, database is included in the multi database indexing
    multilingual:   if true, database is multilingual.  Associated attributes: defaultlanguage, defaultregion, defaultsortorder
    defaultlanguage:
                    will not appear if there is no default language even when multilingual is true
    defaultregion:  not present when null, even when multilingual is true
    defaultsortorder:
                    not present when null, even when multilingual is true
    maintainunread: unread marks are maintained
    increasemaxfields:
                    allow more fields in the database
    maxupdatedbyentries:
                    no max if set to zero or missing
    maxrevisionentries:
                    max if set to zero or ommited
    softdeletionsexpirein:
                    number of hours to keep soft deletions for undelete.
    nourlopen:      Do not allow this database to be opened via a URL.
    copyprofiledocswithdesign:
                    for use with templates
    uselz1:         Use LZ1 compression for attachments in the database.
-->
<!ATTLIST database
    %root.attrs;
    path            %string;       #IMPLIED
    title           %tstring;      #IMPLIED
    categories      CDATA          #IMPLIED
    templatename    %string;       #IMPLIED
    fromtemplate    %string;       #IMPLIED
    type            (%database.types;)
                                   "standard"
    allowstoredforms
                    %boolean;      "true"
    allowbackgroundagents
                    %boolean;      "true"
    imageloadsdeferred
                    %boolean;      "false"
    usejavascriptinpages
                    %boolean;      "true"
    requiressl      %boolean;      "false"
    allowdesignlocking
                    %boolean;      "false"
    allowexternalconnections
                    %boolean;      "false"
    showinopendialog
                    %boolean;      "true"
    advancedtemplate
                    %boolean;      "false"
    markmodifiedunread
                    %boolean;      "true"
    multidbindexed  %boolean;      "false"
    multilingual    %boolean;      "false"
    defaultlanguage %string;       #IMPLIED
    defaultregion   %string;       #IMPLIED
    defaultsortorder
                    %string;       #IMPLIED
    maintainunread  %boolean;      "true"
    optimizetablebitmaps
                    %boolean;      "false"
    overwritefreespace
                    %boolean;      "true"
    savelastaccessed
                    %boolean;      "false"
    logtransactions %boolean;      "true"
    allowsoftdeletion
                    %boolean;      "false"
    allowspecialhierarchy
                    %boolean;      "true"
    allowheadlinemonitors
                    %boolean;      "true"
    increasemaxfields
                    %boolean;      "false"
    maxupdatedbyentries
                    %integer;      #IMPLIED
    maxrevisionentries
                    %integer;      #IMPLIED
    softdeletionsexpirein
                    %integer;      #IMPLIED
    nourlopen       %boolean;      "false"
    unicodestandardsorting
                    %boolean;      "false"
    allowdocumentlocking
                    %boolean;      "false"
    copyprofiledocswithdesign
                    %boolean;      "false"
    singlecopytemplate
                    %boolean;      "false"
    uselz1          %boolean;      "false"
    >

<!-- **** Database Information **** -->

<!ELEMENT databaseinfo ( datamodified?, designmodified?, created?, modified? )>

<!-- Attributes for <databaseinfo>:
    replicaid:		DEPRECATED, you should now get replicaid from root element attributes
    odsversion:     Major version
    diskspace:      used disk space in bytes
    numberofdocuments:
                    in the database
    percentused:    percent of spaced used by the database (numberOfbytesAllocated/dbsize)*100
-->
<!ATTLIST databaseinfo
    dbid            %dbid;         #IMPLIED
    replicaid       %replicaid;    #IMPLIED
    odsversion      %integer;      #IMPLIED
    diskspace       %integer;      #IMPLIED
    numberofdocuments
                    %integer;      #IMPLIED
    percentused     %float;        #IMPLIED
    >

<!ELEMENT datamodified ( datetime )>

<!ELEMENT designmodified ( datetime )>

<!-- **** Access Control Lists **** -->

<!ENTITY % acl.levels "
    noaccess |
    depositor |
    reader |
    author |
    editor |
    designer |
    manager
    ">

<!-- Choices:
    authorreaderfields:
                    Administration server may modify all author and reader fields.
    namesfields:    Administration server may modify all names fields.
-->

<!ENTITY % acl.adminservermaymodify "
    none |
    authorreaderfields |
    namesfields
    ">

<!ELEMENT acl ( role*, aclentry+, logentry* )>

<!-- Attributes for <acl>:
    adminservermaymodify:
                    administration server may modify items.  This attribute replaces adminreaderauthor and will over-ride it unless adminreaderauthor is 'true' and adminservermaymodify is 'none'
    adminreaderauthor:
                    Deprecated.  Please use the adminservermaymodify attribute.
-->
<!ATTLIST acl
    %root.attrs;
    adminserver     %string;       ""
    adminservermaymodify
                    ( %acl.adminservermaymodify; )
                                   "none"
    adminreaderauthor
                    %boolean;      #IMPLIED
    consistentacl   %boolean;      "false"
    maxinternetaccess
                    ( %acl.levels; )
                                   "editor"
    >

<!ELEMENT role ( #PCDATA )>

<!ELEMENT logentry ( #PCDATA )>

<!ENTITY % aclentry.types "
    unspecified |
    person |
    server |
    mixedgroup |
    persongroup |
    servergroup
    ">

<!ELEMENT aclentry ( role* )>

<!-- Attributes for <aclentry>:
    level:          The level implies a specific combination of the "modifier" attributes
that follow it. For each level, only some subset of these modifier attributes
can be overridden. For example, if level='manager', the only modifiers that
can be overridden are deletedoc and releaselockeddoc. The others all are 'true'
for 'manager' access and cannot be set to 'false' for that level. This is
evident from the Notes Client UI for Database - Access Control.
    default:        Indicates that this is the default ACL entry. The name
attribute can be any value, including the empty string.
    createdocs:     Create documents
    deletedocs:     Delete documents
    createpersonalagents:
                    Create personal agents
    createpersonalviews:
                    Create personal folders/views
    createsharedviews:
                    Create shared folders/views
    createlsjavaagents:
                    Create LotusScript/Java agents
    readpublicdocs: Read public documents
    writepublicdocs:
                    Write public documents
-->
<!ATTLIST aclentry
    name            %string;       #REQUIRED
    level           ( %acl.levels; )
                                   #REQUIRED
    default         %boolean;      "false"
    type            ( %aclentry.types; )
                                   "unspecified"
    createdocs      %boolean;      #IMPLIED
    deletedocs      %boolean;      #IMPLIED
    createpersonalagents
                    %boolean;      #IMPLIED
    createpersonalviews
                    %boolean;      #IMPLIED
    createsharedviews
                    %boolean;      #IMPLIED
    createlsjavaagents
                    %boolean;      #IMPLIED
    readpublicdocs  %boolean;      #IMPLIED
    writepublicdocs %boolean;      #IMPLIED
    >

<!-- **** Full Text Search Settings **** -->

<!-- Choices:
    words:          break at words
    wordssentencesparagraphs:
                    break at words, sentences and paragraphs
-->

<!ENTITY % fulltextsettings.breaktypes "
    words |
    wordssentencesparagraphs
    ">

<!ENTITY % fulltextsettings.updatetypes "
    daily |
    hourly |
    immediate |
    scheduled
    ">

<!-- Choices:
    rawtextonly:    faster
    includebinary:  more accurate
-->

<!ENTITY % fulltextsettings.attachment.type "
    rawtextonly |
    includebinary
    ">

<!ELEMENT fulltextsettings (lastindexed?)>

<!-- Attributes for <fulltextsettings>:
    size:           database size in kilobytes
-->
<!ATTLIST fulltextsettings
    size            %integer;      #IMPLIED
    update          (%fulltextsettings.updatetypes;)
                                   #IMPLIED
    unindexeddocumentcount
                    %integer;      #IMPLIED
    casesensitive   %boolean;      "false"
    breakat         (%fulltextsettings.breaktypes;)
                                   "words"
    includeattachments
                    %boolean;      "false"
    attachmenttype  ( %fulltextsettings.attachment.type; )
                                   "rawtextonly"
    includeencryptedfields
                    %boolean;      "true"
    >

<!ELEMENT lastindexed (datetime)>

<!-- **** Launch Settings **** -->

<!-- These whenopened values are listed in the UI for web and notes clients -->

<!ENTITY % launch.common.whenopened "
    openaboutdocument |
    openframeset |
    opennavigatorinwindow |
    openfirstdoclink
    ">

<!--
whenopened values for notes.  They can be used by web too if web.whenopened == usenotesoptions
These correspond to values available in the launch infopane
-->

<!ENTITY % launch.notes.whenopened "
    restorelastview |
    opennavigator |
    openfirstaboutattachment
    ">

<!-- Web Only whenopened values -->

<!ENTITY % launch.webonly.whenopened "
    usenotesoptions |
    openpage |
    openspecifieddoclink |
    openfirstdocumentinview
    ">

<!--
launch.all.whenopened: list of all web and notes client whenopened values.
However, noteslaunch's whenopened can only contain launch.notesonly.whenopened values and weblaunch's whenopened can only contain launch.webonly.whenopened values
-->

<!ENTITY % launch.all.whenopened "
    %launch.common.whenopened; |
    %launch.notes.whenopened; |
    %launch.webonly.whenopened;
    ">

<!--
Navigator Types:
   present if whenopened is opennavigator or opennavigatorinwindow
-->

<!ENTITY % launch.navigatortypes "
    page |
    standard
    ">

<!-- Choices:
    never:          Don't ever show the about document
-->

<!ENTITY % launch.notes.showaboutdocument "
    firstopen |
    firstopenandchanged |
    never
    ">

<!ENTITY % launch.notes.previewdefault "
    bottomright |
    bottom |
    right
    ">

<!-- Attributes:
    whenopened:     
    web client   - implied default is "usenotesoptions"
    notes client - implied default is "restorelastview"
    frameset:       Name of the frameset to launch
    navigator:      name of navigator if "whenopened" is
           set to "openframeset"
-->

<!ENTITY % launch.common.attrs "
    whenopened      (%launch.all.whenopened;)
                                   #IMPLIED
    frameset        %string;       #IMPLIED
    navigator       %string;       #IMPLIED
    ">

<!-- Launch settings- What happens when a database is launched via Notes or the Web -->

<!ELEMENT launchsettings (noteslaunch?, weblaunch?)>

<!-- noteslaunch- controls behavior when database is opened in the Notes client -->

<!ELEMENT noteslaunch EMPTY>
<!ATTLIST noteslaunch
    %launch.common.attrs;
    restorelastview %boolean;      #IMPLIED
    showaboutdocument
                    (%launch.notes.showaboutdocument;)
                                   #IMPLIED
    previewdefault  (%launch.notes.previewdefault;)
                                   #IMPLIED
    navigatortype   (%launch.navigatortypes;)
                                   #IMPLIED
    >

<!ELEMENT weblaunch (doclink?)>
<!ATTLIST weblaunch
    %launch.common.attrs;
    page            %string;       #IMPLIED
    view            %string;       #IMPLIED
    >

<!-- ******************************************************* -->
<!-- * Notes                                               * -->
<!-- ******************************************************* -->

<!--
These constants are for advanced users only, who need to use the <note> element
to create or interpret data that isn't handled by the rest of this DTD.
-->

<!ENTITY % note.classes "
    document |
    helpaboutdocument |
    form |
    view |
    icon |
    helpindex |
    helpusingdocument |
    filter |
    sharedfield |
    replicationformula
    ">

<!-- Attributes common to all note elements (including design elements). -->

<!-- Attributes:
    key:            User-specified ID that can be used to refer to this note.
-->

<!ENTITY % note.attrs "
    %root.attrs;
    key             ID             #IMPLIED
    ">

<!-- Attributes common to language settings. -->

<!-- Attributes:
    language:       The language associated with an element, in ISO format.
-->

<!ENTITY % language.attrs "
    language        %string;       #IMPLIED
    ">

<!-- This is the beginning content in any note -->

<!ENTITY % note.prolog "( noteinfo?, updatedby?, revisions?, wassignedby?, textproperties? )">

<!--
The content at the end of any note. For note types that are highly interpreted
(<form>, <view>, etc), these are only the items left over after interpreting the
note, very likely none. For less-interpreted notes (like <document> and <note>),
most of the content will be expressed in these items.
-->

<!ENTITY % note.epilog "( item* )">

<!--
This element is quite rare, since notes are usually represented with other
elements (such as <document>, <form>, <view>, etc). Using <note> is for
advanced users only.
-->

<!ELEMENT note ( %note.prolog; , %note.epilog; )>
<!ATTLIST note
    %note.attrs;
    class           ( %note.classes; )
                                   #REQUIRED
    default         %boolean;      #IMPLIED
    private         %boolean;      #IMPLIED
    >

<!--
<noteinfo> contains identity information about notes, and is used in many
elements that represent different kinds of notes.
-->

<!ELEMENT noteinfo ( created?, modified?, revised?, lastaccessed?, addedtofile? )>
<!ATTLIST noteinfo
    noteid          %noteid;       #IMPLIED
    unid            %unid;         #IMPLIED
    sequence        %integer;      #IMPLIED
    >

<!ELEMENT revised ( datetime )>

<!ELEMENT lastaccessed ( datetime )>

<!ELEMENT addedtofile ( datetime )>

<!-- Text properties that can be referenced by propid from richtext elements. -->

<!ELEMENT textproperties ( textproperty* )>

<!ELEMENT textproperty EMPTY>

<!-- Attributes for <textproperty>:
    propid:         A unique ID used to reference this particular textproperty set.
-->
<!ATTLIST textproperty
    propid          %integer;      #REQUIRED
    %language.attrs;
    >

<!--
Indicates that the note was signed by the specified identity.  Note signatures
are not emitted by the DXL Exporter, and are not created by the DXL Importer.
Thus, this information is for informational purposes only.  It should only be
considered valid if one can assure that the DXL has not been modified.
Note that the Administrator Client can be used to sign notes after DXL Import if
necessary (e.g., design notes).
-->

<!ELEMENT wassignedby ( name )>

<!-- **** Documents **** -->

<!--
<document> represents a data note interpreted as a document.
There is slightly more interpretation of the items in the note than when
expressed as a <note>.
-->

<!ELEMENT document ( %note.prolog; , %note.epilog; )>

<!-- Attributes for <document>:
    form:           The name of the form associated with the document.
    parent:         The parent's universal ID or key, if this is a response or conflict.
    response:       Is this a response document?
    conflict:       Is this a replication or save conflict response document?
    truncated:      Was this document truncated during replication?
-->
<!ATTLIST document
    %note.attrs;
    form            %string;       #IMPLIED
    parent          %string;       #IMPLIED
    response        %boolean;      "false"
    conflict        %boolean;      "false"
    truncated       %boolean;      #IMPLIED
    >

<!-- **** Profile Documents **** -->

<!-- Profile documents. -->

<!ELEMENT profiledocument ( %note.prolog; , %note.epilog; )>
<!ATTLIST profiledocument
    %root.attrs;
    name            %string;       #REQUIRED
    username        %string;       #IMPLIED
    >

<!-- ******************************************************* -->
<!-- * Items                                               * -->
<!-- ******************************************************* -->

<!ENTITY % simple.types "
    text |
    number |
    datetime |
    textlist |
    numberlist |
    datetimelist |
    itemdata |
    rawitemdata
    ">

<!ENTITY % item.complex.types "
    formula |
    richtext |
    object
    ">

<!ELEMENT item ( %simple.types; | %item.complex.types; )>

<!-- Attributes for <item>:
    sealed:         The item contains data encrypted by Notes.
    summary:        Implied defaults: text item: true, number item: true, time(date) item: true.  Other items do not have a default.
-->
<!ATTLIST item
    name            %string;       #REQUIRED
    sign            %boolean;      "false"
    seal            %boolean;      "false"
    sealed          %boolean;      "false"
    summary         %boolean;      #IMPLIED
    authors         %boolean;      "false"
    names           %boolean;      "false"
    readers         %boolean;      "false"
    placeholder     %boolean;      "false"
    protected       %boolean;      #IMPLIED
    unchanged       %boolean;      #IMPLIED
    >

<!ELEMENT text ( #PCDATA | break  | nonxmlchar )*>

<!ELEMENT number ( #PCDATA )>

<!ELEMENT textlist ( text* )>

<!ELEMENT numberlist ( number* )>

<!ELEMENT datetimelist ( datetime*, datetimepair* )>

<!ELEMENT datetimepair ( datetime, datetime )>

<!--
**NOTE**: <itemdata> is deprecated in 7.0 - use <rawitemdata> instead.

For the types listed in the table below, itemdata contains raw, uninterpreted,
data in HOST format (the native platform's format and layout of data structures
in memory).  Because host format differs from platform to platform, an
application using itemdata with these types should do all of its processing on
platforms with the same host format.  This situation has been rectified in 7.0
with the rawitemdata element, whose contents are always in Domino CANONICAL
format.  Please note that the use of <itemdata> with the types below is very
rare in DXL and thus is unlikely to cause an interoperability issue for your
applications.  Also note that, for any types other than the ones listed below,
the itemdata contents are in CANONICAL format and thus do NOT pose any
interoperability problem in any version of Notes/Domino supporting DXL.

As of 7.0, the DXL Exporter never emits <itemdata>, only <rawitemdata>.
The DXL Importer continues to support <itemdata> for backward-compatibility.

 value of       corresponding
 itemdata       NSF data type
  type           (see C API
attribute           SDK)             Note
_________     ___________________   ______
     7        TYPE_NOTELINK_LIST     (1)
     c        TYPE_HIGHLIGHTS
    16        TYPE_SCHED_LIST        (2)
   100        TYPE_ERROR
   300        TYPE_NUMBER            (1)
   301        TYPE_NUMBER_RANGE      (1)
   400        TYPE_TIME              (1)
   401        TYPE_TIME_RANGE        (1)
   501        TYPE_TEXT_LIST         (1)
   502        TYPE_RFC822_TEXT
   700        TYPE_USERID            (3)

(1) These types normally lead to specific DXL elements and were not usually
    emitted as itemdata by the 6.x DXL Exporter.  For example, items of
	TYPE_TIME generally map to <datetime> elements in DXL and thus most often
	will not be emitted as itemdata.
(2) This type is normally only used in busytime databases.
(3) This type was only used by Notes V1 and V2.
-->

<!ELEMENT itemdata %binary;>
<!ATTLIST itemdata
    type            %hex;          #REQUIRED
    >

<!--
The <rawitemdata> element contains the raw data (uninterpreted and unchanged by
DXL) for a construct of a specific Domino data type, in Domino CANONICAL format,
encoded in Base64.  Its primary purpose is to represent Domino data types that
are not yet specifically supported by DXL, which is to say that they do not
have a more abstract representation in DXL (e.g. TYPE_TIME usually leads to a
datetime element).  Rawitemdata is always guaranteed to perfectly "round-trip",
i.e. if it is exported from a database and subsequently imported into another
database, the data will be identical.  Its obvious down side is that it is not
an abstract representation of the data and thus it does not lend itself to
manipulation by XML processors.  Most constructs in Domino DO have a more
abstract representation and thus will NOT appear as rawitemdata.

The type attribute is required and identifes the Domino data type of the data.
Please note that this value is in hexadecimal.  These values correspond to
TYPE_xxx values which are documented in the C API SDK and can be found in the
file nsfdata.h from the SDK.

The DXL Exporter may emit a richtext (TYPE_COMPOSITE) item as
<rawitemdata type='1'> if it diagnoses an unrecoverable error while attempting
to create the <richtext> representation of the item.
-->

<!ELEMENT rawitemdata %binary;>
<!ATTLIST rawitemdata
    type            %hex;          #REQUIRED
    >

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

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

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

<!ENTITY % file.flags "
    storedindoc
    ">

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

<!ELEMENT filedata %binary;>

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

<!-- Attributes for <file>:
    desiredcompression:
                    This attribute is exported when the original encoding was huffman.  This is done so the filedata can be used by those without the Notes/Domino huffman decompression algorithm.

Only accepted value on import is 'huffman'.  Compression attribute value must be 'none'.
-->
<!ATTLIST file
    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
    >

<!ELEMENT object ( file )>

<!ELEMENT formula ( #PCDATA )>

<!-- Attributes for <formula>:
    compiled:       Does this <formula> contain Base64 compiled code instead of text?
-->
<!ATTLIST formula
    compiled        %boolean;      #IMPLIED
    >

<!-- ******************************************************* -->
<!-- * Rich Text                                           * -->
<!-- ******************************************************* -->

<!-- **** Common Definitions **** -->

<!--
length is taken from CSS-2: horizontal and vertical measurements.
We accept units of in, cm, mm, pt, pc, px, and ex.
These correspond to inches, centimeters, millimeters, points, picas, pixels, and
exs (or x-heights), respectively.  An ex is defined as the height of a lowercase
'x' in the selected font.  Note that not all units are valid in all contexts -
use the Notes Client and Designer as a guideline for the valid units for specific
properties.
-->

<!ENTITY % length "CDATA">

<!-- An explicit length (like %length;) or a percentage. -->

<!ENTITY % lenpct "CDATA">

<!-- This is for attributes whose value is a single length that must be in units of pixels. -->

<!ENTITY % pixels "CDATA">

<!--
This is for attributes whose value is a single length that must either be in
units of pixels or as a percentage.
-->

<!ENTITY % pixpct "CDATA">

<!--
This is for attributes whose value is a single length that must be in units of
pixels, as a percentage, or a relative value.  Examples are "1px", "80%", and
"4", respectively.
-->

<!ENTITY % pixpctrel "CDATA">

<!-- A space-separated list of pixpctrel. -->

<!ENTITY % pixpctrel.list "CDATA">

<!--
Some attributes can take one through four lengths, but the lengths must be in
pixels.
If one is supplied, then it applies to all four edges.
If two are supplied, then the first is top and bottom, the second left and right.
If three are supplied, then the first is top, the second is left and right, and
the fourth is bottom.
If four are supplied, then they are the four edges (top, right, bottom, left) respectively.

-->

<!ENTITY % pixels.1to4 "CDATA">

<!ENTITY % twips "CDATA">

<!-- Colors: as in CSS2. -->

<!ENTITY % color "CDATA">

<!-- Color names that can be used for %color values. -->

<!ENTITY % color.names "
    aqua |
    black |
    blue |
    fuchsia |
    gray |
    green |
    lime |
    maroon |
    navy |
    olive |
    purple |
    red |
    silver |
    teal |
    white |
    yellow |
    none |
    system
    ">

<!ENTITY % reading.orders "
    righttoleft |
    lefttoright
    ">

<!ENTITY % reading.order.attrs "
    readingorder    ( %reading.orders; )
                                   'lefttoright'
    ">

<!-- Attributes:
    direction:      This is similar to to the readingorder attribute.  readingorder
specifies whether text reads left-to-right or right-to-left, whereas direction
specifies whether elements within a "container" element read left-to-right or
right-to-left, e.g. columns in a table.
-->

<!ENTITY % direction.attrs "
    direction       ( %reading.orders; )
                                   'lefttoright'
    ">

<!--
This is used in fields and view columns. Fields can't select "none", view
columns can't select "blankline".
-->

<!ENTITY % list.separators "
    space |
    comma |
    semicolon |
    newline |
    blankline |
    none
    ">

<!--
This entity isn't referenced in the DTD, but defines the names allowed in
the <pardef hide=> attribute. DTDs have no way of expressing a attribute
value that can be a list of tokens from a pre-defined set. This is such a set.
-->

<!-- Choices:
    embedded:       hide when embedded
-->

<!ENTITY % pardef.hide.tokens "
    read |
    edit |
    print |
    copy |
    preview |
    previewedit |
    notes |
    web |
    mobile |
    embedded
    ">

<!ENTITY % lr.aligns "
    left |
    right
    ">

<!ENTITY % simple.aligns "
    left |
    center |
    right
    ">

<!ENTITY % vertical.aligns "
    top |
    center |
    bottom
    ">

<!ENTITY % edge.aligns "
    left |
    right |
    top |
    bottom
    ">

<!ENTITY % complex.aligns "
    topleft |
    topcenter |
    topright |
    middleleft |
    middlecenter |
    middleright |
    bottomleft |
    bottomcenter |
    bottomright
    ">

<!ENTITY % simple.justifys "
    left |
    right |
    center
    ">

<!ENTITY % border.styles "
    none |
    solid |
    double |
    dot |
    dash |
    inset |
    outset |
    ridge |
    groove |
    picture |
    image
    ">

<!ENTITY % space.attrs "
    keepindentation %boolean;      #IMPLIED
    ">

<!-- These mimic the %coreattrs; entity from HTML. -->

<!ENTITY % html.core.attrs "
    htmlid          %string;       #IMPLIED
    htmlclass       %string;       #IMPLIED
    htmlstyle       %string;       #IMPLIED
    htmltitle       %tstring;      #IMPLIED
    extrahtmlattrs  %string;       #IMPLIED
    ">

<!-- Used for both <field> kind= and <section> accessfieldkind= attributes. -->

<!ENTITY % field.kinds "
    editable |
    computed |
    computedfordisplay |
    computedwhencomposed
    ">

<!ENTITY % image.formats "
    gif |
    jpeg |
    notesbitmap |
    cgm
    ">

<!ENTITY % cellbackground.repeats "
    once |
    vrepeat |
    hrepeat |
    tile |
    center |
    resize
    ">

<!-- Choices:
    none:           Do not hide background image.
    editdesign:     Hide background image when editing/designing form, page, or help document.
-->

<!ENTITY % background.hide.tokens "
    none |
    editdesign
    ">

<!-- Background image settings for forms, pages, and help documents. -->

<!ELEMENT background ( ( %image.formats; | imageref )? )>

<!-- Attributes for <background>:
    allowoverride:  Allow user to change background settings. For forms only.
    hide:           When to hide background image.
    tile:           DEPRECATED: Tile graphic to fill background.
-->
<!ATTLIST background
    allowoverride   %boolean;      #IMPLIED
    hide            ( %background.hide.tokens; )
                                   "none"
    tile            %boolean;      #IMPLIED
    repeat          ( %cellbackground.repeats; )
                                   "tile"
    >

<!-- Specifies border characteristics on constructs that have a border -->

<!ELEMENT border ( imageref? ) >

<!-- Attributes for <border>:
    style:          border style, see border.styles, default is none.
                    If style='image', the child imageref element specifies
                    the border image.
    width:          the width of the border. Always pixels.
    insidewidth:    the width of the gutter between the border and the object.
Always pixels.
    outsidewidth:   The width of the gutter between the border and surrounding objects.
Always pixels.
    dropshadowwidth:
                    The thickness of the drop shadow. Always pixels.
-->
<!ATTLIST border
    style           ( %border.styles; )
                                   "none"
    width           %pixels.1to4;  "0"
    insidewidth     %pixels.1to4;  "0"
    outsidewidth    %pixels.1to4;  "0"
    color           %color;        "black"
    dropshadow      %boolean;      "false"
    dropshadowwidth %pixels;       "12px"
    >

<!-- **** Basic Structure **** -->

<!-- Things that can appear at the paragraph level -->

<!ENTITY % richtext.block "
    par |
    pardef |
    table |
    subformref |
    section |
    block
    ">

<!-- The inline elements that aren't hot (don't have an implicit click action). -->

<!-- Choices:
    richtextdata:   holds uninterpreted rich text data
-->

<!ENTITY % richtext.nonhot.inline "
    run |
    break |
    field |
    sharedfieldref |
    picture |
    horizrule |
    anchor |
    embeddeddatepicker |
    embeddedfileuploadcontrol |
    embeddedfolderpane |
    embeddednavigator |
    embeddedoutline |
    embeddedview |
    imagemap |
    span |
    namedelementref |
    nonxmlchar |
    embeddedcontrol |
    richtextdata
    ">

<!-- Links that can appear in rich text. -->

<!ENTITY % richtext.links "
    doclink |
    viewlink |
    databaselink |
    urllink |
    namedelementlink
    ">

<!-- Elements that are hot (have an implicit click action). -->

<!ENTITY % richtext.hot.inline "
    %richtext.links; |
    attachmentref |
    button |
    computedtext |
    popup |
    javaapplet |
    actionhotspot |
    objectref |
    region
    ">

<!-- Things that can appear in running text. -->

<!ENTITY % richtext.inline "
    %richtext.nonhot.inline; |
    %richtext.hot.inline;
    ">

<!-- Rich text is a series of paragraphs, sections, etc. -->

<!ELEMENT richtext ( %richtext.block; )*>

<!ELEMENT block ( font?, ( %richtext.block; )* )>

<!-- Attributes for <block>:
    textpropid:     References a specific <textproperty> element in the note that contains text properties that apply to the entire content of the block.
-->
<!ATTLIST block
    html            %boolean;      "false"
    %reading.order.attrs;
    %space.attrs;
    textpropid      %integer;      #IMPLIED
    >

<!ENTITY % highlights "
    none |
    yellow |
    pink |
    blue
    ">

<!ELEMENT run ( #PCDATA | font | %richtext.inline; )*>

<!-- Attributes for <run>:
    html:           Is this text pass-through HTML?
-->
<!ATTLIST run
    html            %boolean;      "false"
    highlight       ( %highlights; )
                                   "none"
    %reading.order.attrs;
    %space.attrs;
    >

<!-- **** Fonts **** -->

<!--
Generic font names that can be used in the <font name='...'/> attribute,
in addition to specific font names.
-->

<!ENTITY % font.names "
    monospace |
    multilingual |
    sans-serif |
    serif |
    user-interface
    ">

<!-- Tokens that can be used in the <font style='...'/> attribute. -->

<!ENTITY % font.styles "
    normal |
    bold |
    italic |
    underline |
    strikethrough |
    superscript |
    subscript |
    shadow |
    emboss |
    extrude
    ">

<!ENTITY % font.pitches "
    fixed |
    variable
    ">

<!--
<font> is not a container as it is in HTML. It is associated with other content
by being a child of a container. For example, to make a run of text red:
    <run><font color='red'/>This is red text.</run>
-->

<!ELEMENT font EMPTY>

<!-- Attributes for <font>:
    size:           The size of the font, in points.
    style:          A list of tokens taken from %font.styles;
    pitch:          On Notes Client platforms, this attribute can most often be deduced on
import from the font name.  Specify it to guarantee round-tripping across all
platforms.
    truetype:       On Notes Client platforms, this attribute can most often be deduced on
import from the font name.  Specify it to guarantee round-tripping across all
platforms.  Attribute specifies whether font is a TrueType font.
    familyid:       On Notes Client platforms, this attribute can most often be deduced on
import from the font name.  Specify it to guarantee round-tripping across all
platforms.  Values are defined in operating system header files.  Note that the
DXL value is specified in hexadecimal.  Common possible values are:
        10    Roman
        20    Swiss
        30    Modern
        40    Script
        50    Decorative
-->
<!ATTLIST font
    name            %string;       #IMPLIED
    color           %color;        #IMPLIED
    size            %length;       #IMPLIED
    style           NMTOKENS       #IMPLIED
    pitch           ( %font.pitches; )
                                   #IMPLIED
    truetype        %boolean;      #IMPLIED
    familyid        %hex;          #IMPLIED
    >

<!-- **** Paragraphs **** -->

<!-- Paragraphs don't have explicit style info: they reference pardef's. -->

<!ENTITY % pardef.id "NMTOKEN">

<!ELEMENT par ( #PCDATA |  border | %richtext.inline; )*>
<!ATTLIST par
    def             %pardef.id;    #IMPLIED
    %space.attrs;
    >

<!ENTITY % pardef.linespacings "
    1 |
    1.5 |
    2
    ">

<!ENTITY % pardef.aligns "
    left |
    right |
    center |
    full |
    none
    ">

<!ENTITY % pardef.list.styles "
    none |
    bullet |
    number |
    check |
    uncheck |
    circle |
    square |
    alphaupper |
    alphalower |
    romanupper |
    romanlower
    ">

<!-- Paragraph definitions -->

<!ELEMENT pardef ( code?, parstyle? )>

<!-- Attributes for <pardef>:
    hide:           a list of keywords taken from %pardef.hide.tokens;
    keepwithnext:   Should this paragraph and the next be kept on the same page?
This is not an option for tables in paragraphs, where it is always true.
    keeptogether:   Should this paragraph be kept unbroken on one page?
This is not an option for paragraphs in tables, where it is always true.
-->
<!ATTLIST pardef
    id              %pardef.id;    #REQUIRED
    align           ( %pardef.aligns; )
                                   "left"
    linespacing     ( %pardef.linespacings; )
                                   "1"
    spacebefore     ( %pardef.linespacings; )
                                   "1"
    spaceafter      ( %pardef.linespacings; )
                                   "1"
    leftmargin      %lenpct;       #IMPLIED
    rightmargin     %lenpct;       #IMPLIED
    firstlineleftmargin
                    %lenpct;       #IMPLIED
    tabs            %tokens;       #IMPLIED
    hide            %tokens;       ""
    newpage         %boolean;      "false"
    keepwithnext    %boolean;      #IMPLIED
    keeptogether    %boolean;      #IMPLIED
    list            ( %pardef.list.styles; )
                                   "none"
    %reading.order.attrs;
    >

<!--
A paragraph style.  In the Notes Client, this is the Paragraph Styles tab of the
Text info box.
-->

<!ELEMENT parstyle ( font? )>

<!-- Attributes for <parstyle>:
    name:           The style name.
    incyclekey:     Assign style to cycle key (F11)?
    alldocuments:   Make style available for all documents?
    username:       If alldocuments is true, this is the username (abbreviated common name)
who created the style.
-->
<!ATTLIST parstyle
    name            %string;       #REQUIRED
    incyclekey      %boolean;      "false"
    alldocuments    %boolean;      "false"
    username        %string;       #IMPLIED
    >

<!-- **** Tables **** -->

<!ENTITY % table.widthtypes "
    fixedleft |
    fixedcenter |
    fixedright |
    fitmargins |
    fitwindow
    ">

<!ENTITY % table.cell.border.styles "
    solid |
    ridge |
    groove
    ">

<!-- The color styles for <table colorstyle="">. -->

<!-- Choices:
    none:           No table-wide coloring.
    solid:          the entire table is a single color.
    altrows:        rows alternate between color and altcolor.
    altcolumns:     columns alternate between color and altcolor.
    lefttop:        the left column and top row are color, the rest is altcolor.
    left:           the leftmost column is color, the rest is altcolor.
    righttop:       the rightmost column and top row are color, the rest is altcolor.
    right:          the rightmost column is color, the rest is altcolor.
    top:            the top row is color, the rest is altcolor.
-->

<!ENTITY % table.color.styles "
    none |
    solid |
    altrows |
    altcolumns |
    lefttop |
    left |
    righttop |
    right |
    top
    ">

<!ENTITY % table.row.displays "
    all |
    tabs |
    timer |
    onclick |
    compute |
    tabscompute |
    onclicktimer |
    onopentimer |
    captions
    ">

<!ENTITY % table.tablocations "
    top |
    left |
    bottom |
    right
    ">

<!ELEMENT table ( tablerowstyle?, border?, tablecolumn*, tablerow* )>

<!-- Attributes for <table>:
    colorstyle:     The style of the table coloring.
    bgcolor:        the color to use for table coloring. See the colorstyle attribute.
    altbgcolor:     the other color to use for table coloring.
    refwidth:       Specifies the absolute width of the table. Table margins and column
                    widths can be specified as absolute values or percentages. The Notes
                    client always calculates absolute values from the percentages for
                    display purposes and uses the current screen size as a reference. The
                    refwidth attribute specifies a reference width for the table that aids 
                    in making an imported table display exactly the same as one created
                    with the client.
    refrightmargin: The right margin of the page or screen (e.g. when the table was last
                    saved in the Notes Client).  Assures that if a table is exported and
                    re-imported, it will be visually identical to the original.  Only used
                    for non-nested, fixed width tables with percentage left margins.
    r4spacing:      DEPRECATED.  Replaced in 7.0 by the table attribute user4spacing.
                    7.0+ Exporter no longer emits this attribute, and no longer does any
                    conversion of pardef margins to absolute values as described below.
                    7.0+ Importer still supports this attribute for backward compatibility.
                    When true, specifies that the table uses R4 spacing rules.
                    When r4spacing='true', the margins of all <pardef>s contained within the table
                    are ABSOLUTE values (i.e. relative to the left edge of the entire document).
                    Normally, the margins of all <pardef>s contained within tables are RELATIVE
                    values which are offsets from the left edge of the table cell.
                    r4spacing affects <tablecolumn>s as well - see the refwidth attribute.
                    r4spacing is ignored for fixedright or fixedcenter tables, which did not exist in
                    R4.
    user4spacing:   Make your tables compatible with Notes R4.  Tables in R6 or later are
                    smaller than tables in R4.
    rowtimer:       when rowdisplay='timer', this is the number of milliseconds between
rows.
    sizetabsequally:
                    Specifies to size all tabs equally when rowdisplay='tabs'.
The implied default is false.
    firsttabindent: Specifies indentation of first tab when rowdisplay='tabs'.
The implied default is 0 pixels.
    tablocation:    Specifies the location of tabs when rowdisplay='tabs'.
The implied default is 'top'.
    insidewrapheight:
                    The height at which text flows among the columns.
-->
<!ATTLIST table
    widthtype       ( %table.widthtypes; )
                                   #IMPLIED
    minrowheight    %length;       "0"
    rowspacing      %length;       "0"
    columnspacing   %length;       "0"
    cellborderstyle ( %table.cell.border.styles; )
                                   "solid"
    cellbordercolor %color;        "none"
    colorstyle      ( %table.color.styles; )
                                   "none"
    bgcolor         %color;        #IMPLIED
    altbgcolor      %color;        #IMPLIED
    leftmargin      %lenpct;       "1in"
    rightmargin     %lenpct;       "100%"
    refwidth        %length;       #IMPLIED
    refrightmargin  %length;       #IMPLIED
    r4spacing       %boolean;      #IMPLIED
    user4spacing    %boolean;      "false"
    rowdisplay      ( %table.row.displays; )
                                   "all"
    rowtimer        %integer;      #IMPLIED
    sizetabsequally %boolean;      #IMPLIED
    firsttabindent  %pixels;       #IMPLIED
    tablocation     ( %table.tablocations; )
                                   #IMPLIED
    outsidewrap     %boolean;      "false"
    insidewrap      %boolean;      "false"
    insidewrapheight
                    %length;       #IMPLIED
    %html.core.attrs;
    %direction.attrs;
    >

<!--
Color and font for tab labels and captions (for tabbed tables and caption tables
only).
-->

<!ELEMENT tablerowstyle ( font )>

<!ELEMENT tablecolumn EMPTY>

<!-- Attributes for <tablecolumn>:
    sizetofit:      Size column to fit content.
    refwidth:       DEPRECATED.  Replaced in 7.0 by the table attribute refwidth.
                    7.0+ Exporter no longer emits this attribute.
                    7.0+ Importer still supports this attribute for backward compatibility.
                    This attribute only applies to a table with r4spacing='true' and with a
                    widthtype other than fixedright or fixedcenter.  Further, it only applies if the
                    tablecolumn width attribute is expressed as a percentage.  See the comment on
                    the table r4spacing attribute.  Because <pardef>s within R4 spacing tables use
                    absolute margin values, the table column needs a "reference width" that is
                    consistent with those values.  This allows the DXL Importer to make the
                    necessary adjustments.  This is analagous to the Notes Client, which has a frame
                    of reference which is the current screen size to use as a basis for the table
                    cell widths, and adjusts the values when the screen size changes.
-->
<!ATTLIST tablecolumn
    width           %length;       #IMPLIED
    sizetofit       %boolean;      "false"
    refwidth        %length;       #IMPLIED
    >

<!ELEMENT tablerow ( tablecell* )>
<!ATTLIST tablerow
    name            %string;       #IMPLIED
    tablabel        %tstring;      #IMPLIED
    >

<!ENTITY % tablecell.color.styles "
    solid |
    vgradient |
    hgradient
    ">

<!ENTITY % tablecell.transitions "
    none |
    rolling |
    lefttoright |
    toptobottom |
    wipe |
    boxes |
    explode |
    dissolve
    ">

<!ELEMENT tablecell ( cellbackground?, ( %richtext.block; )* )>

<!-- Attributes for <tablecell>:
    bgcolor:        The background color of the cell. Background images are stored in
the <background> element.
    altbgcolor:     The second color to use with gradient colorstyle
	rowheader/columnheader:   "true" indicates that the cell is the header for a
row and/or column.
-->
<!ATTLIST tablecell
    bgcolor         %color;        #IMPLIED
    rowspan         %integer;      "1"
    columnspan      %integer;      "1"
    colorstyle      ( %tablecell.color.styles; )
                                   #IMPLIED
    altbgcolor      %color;        #IMPLIED
    valign          ( %vertical.aligns; )
                                   #IMPLIED
    borderwidth     %pixels.1to4;  "1px"
    rowheader       %boolean;      "false"
    columnheader    %boolean;      "false"
    transition      ( %tablecell.transitions; )
                                   "none"
    %html.core.attrs;
    >

<!-- Background image settings for table cells. -->

<!ELEMENT cellbackground ( ( %image.formats; | imageref )? )>
<!ATTLIST cellbackground
    repeat          ( %cellbackground.repeats; )
                                   #IMPLIED
    >

<!-- **** Sections **** -->

<!-- The set of actions for section auto-expanding and collapsing. -->

<!-- Choices:
    editorexpand:   For section editors in controlled-access sections only.
    editorcollapse: For section editors in controlled-access sections only.
-->

<!ENTITY % section.colexp.tokens "
    expand |
    collapse |
    editorexpand |
    editorcollapse
    ">

<!ENTITY % section.border.styles "
    none |
    single |
    double |
    triple |
    shadow |
    twoline |
    windowcaption |
    gradient |
    tab |
    tabdiag
    ">

<!ELEMENT section ( sectiontitle, code?, ( %richtext.block; )* )>

<!-- Attributes for <section>:
    onread:         Tokens from %section.colexp.tokens; for what to do when reading.
    onedit:         Tokens from %section.colexp.tokens; for what to do when editing.
    onpreview:      Tokens from %section.colexp.tokens; for what to do when previewing.
    onprint:        Tokens from %section.colexp.tokens; for what to do when printing.
    expanded:       Is this section currently expanded?
    showastext:     Show as text when not previewing.
    accessfieldkind:
                    Is access list field editable or computed? For controlled-access sections only.
    accessfieldname:
                    Access list field name for R3 compatibility. For controlled-access sections only.
-->
<!ATTLIST section
    onread          %tokens;       ""
    onedit          %tokens;       ""
    onpreview       %tokens;       ""
    onprint         %tokens;       ""
    expanded        %boolean;      "false"
    showastext      %boolean;      "false"
    accessfieldkind ( %field.kinds; )
                                   #IMPLIED
    accessfieldname %string;       #IMPLIED
    >

<!--
<sectiontitle> is the title of the section. It carries the twistie, and has
other cosmetic attributes.
-->

<!ELEMENT sectiontitle ( font?, ( text | code ) )>

<!-- Attributes for <sectiontitle>:
    textpropid:     References a specific <textproperty> element in the note that contains text properties of the section title.
-->
<!ATTLIST sectiontitle
    pardef          %pardef.id;    #IMPLIED
    color           %color;        #IMPLIED
    borderstyle     ( %section.border.styles; )
                                   "none"
    hidewhenexpanded
                    %boolean;      "false"
    textpropid      %integer;      #IMPLIED
    >

<!-- **** Inline stuff **** -->

<!-- A line break (hard return) in rich text. -->

<!ELEMENT break EMPTY>

<!-- A chunk of computed text. -->

<!ELEMENT computedtext ( code? )>
<!ATTLIST computedtext
    %html.core.attrs;
    >

<!-- Horizontal rule. -->

<!ENTITY % horizrule.color.styles "
    solid |
    vgradient
    ">

<!ELEMENT horizrule EMPTY>

<!-- Attributes for <horizrule>:
    height:         Horizontal rule height.
    width:          Horizontal rule width. Can be percentage of the window width.
    color:          Fill color.
    colorstyle:     Fill color style (solid or vertical gradient).
    gradientcolor:  Secondary color if colorstyle="vgradient".
    use3dshading:   Use 3D shading effect.
-->
<!ATTLIST horizrule
    height          %length;       ".0729in"
    width           %lenpct;       "100%"
    color           %color;        #IMPLIED
    colorstyle      ( %horizrule.color.styles; )
                                   "solid"
    gradientcolor   %color;        #IMPLIED
    use3dshading    %boolean;      "true"
    %html.core.attrs;
    >

<!--
A span holds an arbitrary region of richtext content that shares the same text
properties.  The propid attribute uniquely references a specific <textproperty>
element in the note.
-->

<!ELEMENT span ( #PCDATA | %richtext.inline; )*>
<!ATTLIST span
    propid          %integer;      #REQUIRED
    regionid        %integer;      #IMPLIED
    >

<!-- **** Pictures **** -->

<!-- Choices:
    around:         flow text around the image
    left:           flow text to the left of the image
    right:          flow text to the right of the image
-->

<!ENTITY % picture.aligns "
    around |
    left |
    right |
    bottom |
    middle |
    top |
    baseline
    ">

<!-- A picture in a rich text field. -->

<!ELEMENT picture ( border?, ( %image.formats; | imageref | nativeimage ), caption?, code* )>
<!ATTLIST picture
    height          %pixels;       #IMPLIED
    width           %pixels;       #IMPLIED
    scaledheight    %length;       #IMPLIED
    scaledwidth     %length;       #IMPLIED
    alttext         %tstring;      #IMPLIED
    align           ( %picture.aligns; )
                                   "baseline"
    %html.core.attrs;
    name            %string;       #IMPLIED
    >

<!ENTITY % image.original.formats "
    notesbitmap
    ">

<!-- For representing GIF image content. -->

<!ELEMENT gif %binary;>
<!ATTLIST gif
    originalformat  ( %image.original.formats; )
                                   #IMPLIED
    >

<!-- For representing JPEG image content. -->

<!ELEMENT jpeg %binary;>

<!--
For representing proprietary Notes bitmap image content. The base64 content is
a series of CD records representing the bitmap.
-->

<!ELEMENT notesbitmap %binary;>

<!-- A Computer Graphics Metafile. -->

<!ELEMENT cgm %binary;>
<!ATTLIST cgm
    height          %twips;        #IMPLIED
    width           %twips;        #IMPLIED
    >

<!--
Image resources are referenced with <sharedimageref>. Use either the name
attribute for a reference by name, or the <code event='value'> child element
for a computed reference.
-->

<!ELEMENT imageref ( code? )>

<!-- Attributes for <imageref>:
    database:       Can be a value from named.element.link.databases or a %replicaid;
-->
<!ATTLIST imageref
    name            %tstring;      #IMPLIED
    database        %string;       #IMPLIED
    >

<!ENTITY % image.type "
    gif |
    jpeg
    ">

<!ELEMENT nativeimage EMPTY>
<!ATTLIST nativeimage
    imagetype       (%image.type;) #IMPLIED
    imagename       %string;       #IMPLIED
    >

<!ENTITY % caption.positions "
    below |
    center
    ">

<!ELEMENT caption ( #PCDATA )>
<!ATTLIST caption
    position        ( %caption.positions; )
                                   "below"
    >

<!-- **** Links **** -->

<!-- Common attributes for all link elements. -->

<!-- Attributes:
    showborder:     Display a border around the link content (hotspot links only).
    targetframe:    Target frame in which to display the linked document, URL, or design element.
-->

<!ENTITY % link.attrs "
    showborder      %boolean;      'false'
    targetframe     %string;       #IMPLIED
    %html.core.attrs;
    regionid        %integer;      #IMPLIED
    ">

<!-- Content for hotspot links except <urllink> and <namedelementlink>, -->

<!ENTITY % link.content "( #PCDATA | %richtext.inline; )*">

<!-- <urllink> and <namedelementlink> content. -->

<!ENTITY % link.computed.content "( #PCDATA | code | %richtext.inline; )*">

<!-- The named design elements that can be used in <namedelement> links. -->

<!ENTITY % named.element.link.types "
    page |
    form |
    frameset |
    view |
    folder |
    navigator
    ">

<!-- Special values for <namedelementlink> database attribute. -->

<!ENTITY % named.element.link.databases "
    mailfile |
    addressbook |
    subscriptions |
    bookmarks
    ">

<!--
<doclink>, <viewlink>, and <databaselink> represent links to a document (or
anchor location within a document), view or folder, or database, respectively.
If these elements are empty, they represent standard non-hotspot Notes links,
which are displayed in the rich text using the standard link icons. If the link
elements contain rich text, they represent hotspot links, and can be activated by
clicking anywhere in the contained rich text.
-->

<!ELEMENT doclink %link.content;>

<!-- Attributes for <doclink>:
    document:       Universal ID or key of target document.
    anchor:         For anchor links, name of target <anchor> within target document.
    view:           Universal ID or key of view that contains target document (optional).
    database:       Replica ID of database containing target document (optional).
    server:         Name of server to check for database containing target document (optional).
    description:    Description to display in Link Properties infobox (optional).
-->
<!ATTLIST doclink
    document        %string;       #REQUIRED
    anchor          %string;       #IMPLIED
    view            %string;       #IMPLIED
    database        %replicaid;    #IMPLIED
    server          %string;       #IMPLIED
    description     %string;       #IMPLIED
    %link.attrs;
    >

<!ELEMENT viewlink %link.content;>

<!-- Attributes for <viewlink>:
    view:           Universal ID or key of target view.
    database:       Replica ID of database containing target view (optional).
    server:         Name of server to check for database containing target view (optional).
    description:    Description to display in Link Properties infobox (optional).
-->
<!ATTLIST viewlink
    view            %string;       #REQUIRED
    database        %replicaid;    #IMPLIED
    server          %string;       #IMPLIED
    description     %string;       #IMPLIED
    %link.attrs;
    >

<!ELEMENT databaselink %link.content;>

<!-- Attributes for <databaselink>:
    database:       Replica ID of target database.
    server:         Name of server to check for target database (optional).
    description:    Description to display in Link Properties infobox (optional).
-->
<!ATTLIST databaselink
    database        %replicaid;    #REQUIRED
    server          %string;       #IMPLIED
    description     %string;       #IMPLIED
    %link.attrs;
    >

<!--
<urllink> represents a hotspot that links to a URL. The URL can be specified
using either the href attribute or a formula (<code event='value'><formula>...),
but not both.
-->

<!ELEMENT urllink %link.computed.content;>

<!-- Attributes for <urllink>:
    href:           The URL to link to. Required unless the URL is computed by a formula.
-->
<!ATTLIST urllink
    href            %uri;          #IMPLIED
    %link.attrs;
    >

<!--
<namedlementlink> represents a hotspot that links to a named design element.
The element name can be specified using either the name attribute or a formula
(<code event='value'><formula>...), but not both.
-->

<!ELEMENT namedelementlink %link.computed.content;>

<!-- Attributes for <namedelementlink>:
    name:           Design element name. Required unless the name is computed by a formula.
    type:           Design element type (form, view, etc.).
    database:       Database containing design element (optional). Can be a replica ID
or a special database keyword (one of %named.element.link.databases).
-->
<!ATTLIST namedelementlink
    name            %tstring;      #IMPLIED
    type            ( %named.element.link.types; )
                                   #REQUIRED
    database        %string;       #IMPLIED
    %link.attrs;
    >

<!-- <anchor> represents an anchor target for a <doclink>. -->

<!ELEMENT anchor EMPTY>

<!-- Attributes for <anchor>:
    name:           Name used to identify this anchor in the <doclink>.
-->
<!ATTLIST anchor
    name            %string;       #REQUIRED
    >

<!-- **** Other Hotspots **** -->

<!-- Determines what event triggers the display of the pop-up text. -->

<!ENTITY % popup.show.types "
    onmouseover |
    onclick
    ">

<!-- Determines the style applied to the popup hotspot text. -->

<!ENTITY % popup.hotspot.styles "
    border |
    highlight |
    none
    ">

<!--
Popup contains the popuptext that is displayed when a Text Pop-up Hotspot is
activated, or <code> that determines the text to display for a Formula Pop-up
Hotspot.  The rich text and character content is the hotspot text itself.
-->

<!ELEMENT popup ( #PCDATA | popuptext | code | %richtext.inline; )*>
<!ATTLIST popup
    show            ( %popup.show.types; )
                                   "onmouseover"
    hotspotstyle    ( %popup.hotspot.styles; )
                                   "border"
    regionid        %integer;      #IMPLIED
    >

<!ELEMENT popuptext ( #PCDATA )>

<!--
Determines the style applied to the action hotspot rich text (the clickable area
for the hotspot).
-->

<!ENTITY % action.hotspot.styles "
    border |
    none
    ">

<!--
An Action Hotspot within rich text.  Should contain a single <code> element which
contains the formula, simple action(s), Lotuscript, or Javascript to execute when
the action hotspot is clicked.  The rich text content identifies the clickable
region of the hotspot.
-->

<!ELEMENT actionhotspot ( #PCDATA | code | %richtext.inline; )*>
<!ATTLIST actionhotspot
    hotspotstyle    ( %action.hotspot.styles; )
                                   "border"
    targetframe     %string;       #IMPLIED
    name            CDATA          #IMPLIED
    %html.core.attrs;
    regionid        %integer;      #IMPLIED
    >

<!--
Many Notes rich text constructs can span across all or parts of multiple
paragraphs.  Such constructs, when they do span in this manner, are broken up
into multiple pieces in DXL.  The first piece is the DXL element corresponding to
the construct, such as <actionhotspot>.  The remaining pieces are one or more
<region> elements.  These elements are all "tied together" by means of a regionid
attribute whose value is the same for all pieces of the element, and unique from
any other elements within the same <richtext> element.
-->

<!ELEMENT region ( #PCDATA | %richtext.inline; )*>

<!-- Attributes for <region>:
    end:            A value of true indicates that this is the last <region> with the specific
regionid within this richtext element.
-->
<!ATTLIST region
    regionid        %integer;      #REQUIRED
    end             %boolean;      "false"
    >

<!-- **** Attachments **** -->

<!--
A reference to a file attachment.  In practice, the content is generally a single
<picture>.  It is also possible to have character data content that is a
"caption" that becomes part of the hotspot for the attachment.  The Rnext DXL
Importer does not support content other than picture and character data.
-->

<!ELEMENT attachmentref ( #PCDATA | picture )*>

<!-- Attributes for <attachmentref>:
    name:           The name of the attachment that this <attachmentref> refers to.
If no path attribute is specified, the note must contain a $FILE item
representing an attachment with the specified name.
    displayname:    The attachment filename displayed in the Attachment Properties
infobox. For attachments created by the Notes client, this name is also part
of the attachment icon. If not specified, the displayname is derived from
the path or name attributes.
    caption:        Filename or other text appended to the attachment icon, if any.
Can be used if the icon is missing or doesn't include the filename.
    path:           The pathname of a file to attach. If no path is specified, the name
attribute must be specified.
    regionid:       DEPRECATED.
-->
<!ATTLIST attachmentref
    name            %string;       #IMPLIED
    displayname     %string;       #IMPLIED
    caption         %string;       #IMPLIED
    path            %string;       #IMPLIED
    regionid        %integer;      #IMPLIED
    >

<!-- **** Objects **** -->

<!ENTITY % objectref.types "
    autolink |
    manuallink |
    embeddedobject
    ">

<!ENTITY % objectref.display.formats "
    text |
    metafile |
    bitmap |
    richtext |
    icon
    ">

<!-- Choices:
    structstorage:  OLE "Docfile" structured storage format.
RootIStorage/IStorage/IStream (Notes format).
    istorageistream:
                    OLE IStorage/IStream structured storage format.
    structstream:   OLE RootIStorage/IStream structured storage format.
-->

<!ENTITY % objectref.storage.formats "
    structstorage |
    istorageistream |
    structstream
    ">

<!--
A reference to an Object or Control within richtext.  The content of this element
describes the rendering of the object with the client.  The actual data for the
object is stored in a number of $FILE items; the primary one is specified by the
name attribute.
-->

<!ELEMENT objectref ( associatedfiles?, ( %richtext.nonhot.inline; )* )>

<!-- Attributes for <objectref>:
    version:        The OLE version number.
    name:           The name of the primary $FILE item for this object.  This is not
necessarily the same name as the actual file that the object was created from, if
in fact it was created from a file.
    class:          The object's class name.
    type:           Identifies the object type.
    savewhenchanged:
                    Indicates that changes in the object embedded in a form are to
be saved in the document which uses that form.
    render:         Specifies whether the object renders itself in the UI.
    displayformat:  The format used for displaying the object and copying its data to
the clipboard.
    description:    A text description of the object.
    classid:        The GUID that identifies the object's class, also called a Class ID or
CLSID.  DXL uses the string format for a GUID, e.g.
{c200e360-38c5-11ce-ae62-08002b2b79ef}
    storageformat:  The storage format of the object.
    scripted:       True if the object contains code.
    runreadonly:    Specifies whether to run the object when reading the document.  By
default, the object is run when the document is edited.
    fittowindow:    Specifies whether to size object to fit window.
    control:        True if the object is a control.
    fitbelowfields: Specifies whether to size object to fit below fields.
-->
<!ATTLIST objectref
    version         %integer;      "2"
    name            %string;       #REQUIRED
    class           %string;       #IMPLIED
    type            ( %objectref.types; )
                                   "embeddedobject"
    savewhenchanged %boolean;      "false"
    render          %boolean;      "true"
    displayformat   ( %objectref.display.formats; )
                                   "metafile"
    description     %string;       #IMPLIED
    classid         %string;       #REQUIRED
    storageformat   ( %objectref.storage.formats; )
                                   "structstorage"
    scripted        %boolean;      "false"
    runreadonly     %boolean;      "false"
    fittowindow     %boolean;      "false"
    control         %boolean;      "false"
    fitbelowfields  %boolean;      "false"
    regionid        %integer;      #IMPLIED
    %html.core.attrs;
    >

<!--
Additional files (other than the files that make up the object itself), in $FILE
items, that are associated with the object.
-->

<!ELEMENT associatedfiles ( fileitemref+ )>

<!-- A reference to a $FILE item by name.  The name is stored as part of the item. -->

<!ELEMENT fileitemref EMPTY>
<!ATTLIST fileitemref
    name            %string;       #REQUIRED
    >

<!--
A Java Applet within rich text.  Must contain at least one code element which
contains a <javaproject> that holds the Java code.  Additional code elements can
be used which contain <formula>s for the HTML Attributes and Alternate HTML.
-->

<!ELEMENT javaapplet ( appletparameters?, code+ )>

<!-- Attributes for <javaapplet>:
    width:          The width of the rendering of the applet.
    height:         The height of the rendering of the applet.
    inactivetext:   Text to display when applet is not running.
    usescorbaclasses:
                    Applet uses Notes CORBA classes
    usescorbassl:   Applet uses CORBA SSL security.
    name:           Corresponds to the name in the "Applet Extra HTML" tab of the Java applet
properties in the Notes client.
-->
<!ATTLIST javaapplet
    width           %pixpct;       #IMPLIED
    height          %pixpct;       #IMPLIED
    inactivetext    %string;       #IMPLIED
    usescorbaclasses
                    %boolean;      "false"
    usescorbassl    %boolean;      "false"
    name            CDATA          #IMPLIED
    %html.core.attrs;
    >

<!--
Each applet parameter is represented by a <code> element whose name attribute
is the parameter name and which contains a <formula> for the parameter value.
The formula can also be a simple value such as a number or a text string.
-->

<!ELEMENT appletparameters ( code+ )>

<!-- **** Embedded Outline **** -->

<!-- Choices:
    fixed:          set width attribute for the actual width
    fitwindow:      fit window with.  See widthpercent for percent of widow width.
    fitcontent:     sized width to the size of the items within.
    fixedcharacter: width-only
-->

<!ENTITY % eoutline.sizetypes "
    fixed |
    fitwindow |
    fitcontent |
    fixedcharacter
    ">

<!-- used for embedded outlines and outline designs -->

<!ENTITY % outline.types "
    flat |
    tree
    ">

<!ENTITY % outline.displaydirections "
    vertical |
    horizontal
    ">

<!-- Choices:
    saved:          expanded as saved.
    none:           expand none.  Same as collapse all.
-->

<!ENTITY % outline.expandtypes "
    all |
    first |
    saved |
    none
    ">

<!-- Choices:
    simple:         just the text as specified in the infobox.
-->

<!ENTITY % outline.titlestyles "
    simple |
    hide |
    hierarchical
    ">

<!ENTITY % eoutline.height.types "
    fitcontent |
    fixed
    ">

<!-- Choices:
    resize:         resize to fit outline 
-->

<!ENTITY % eoutline.repeats "
    once |
    hrepeat |
    vrepeat |
    tile |
    resize
    ">

<!ELEMENT layout EMPTY>

<!-- Attributes for <layout>:
    imagehoffset:   background horizonal offset in inches
    imagevoffset:   background vertical offset
-->
<!ATTLIST layout
    heighttype      ( %eoutline.height.types; )
                                   "fitcontent"
    height          %length;       #IMPLIED
    entryhoffset    %length;       #IMPLIED
    entryvoffset    %length;       #IMPLIED
    imagehoffset    %length;       #IMPLIED
    imagevoffset    %length;       #IMPLIED
    imagealign      ( %complex.aligns; )
                                   "topleft"
    labelhoffset    %length;       #IMPLIED
    labelvoffset    %length;       #IMPLIED
    labelalign      ( %complex.aligns; )
                                   "topleft"
    >

<!ELEMENT eoutlinebackground ( imageref? )>

<!-- Attributes for <eoutlinebackground>:
    normalcolor:    appears for control, title, toplevel, sublevel elements
    selectedcolor:  appears for control, toplevel, sublevel elements
    mouseovercolor: appears for title, toplevel, sublevel elements
-->
<!ATTLIST eoutlinebackground
    normalcolor     %color;        #IMPLIED
    selectedcolor   %color;        #IMPLIED
    mouseovercolor  %color;        #IMPLIED
    repeat          ( %eoutline.repeats; )
                                   "once"
    >

<!ELEMENT control ( eoutlinebackground? )>

<!ELEMENT title ( font?, eoutlinebackground?, layout? )>
<!ATTLIST title
    style           ( %outline.titlestyles; )
                                   "hide"
    normalcolor     %color;        #IMPLIED
    mouseovercolor  %color;        #IMPLIED
    >

<!ELEMENT toplevel ( font?, eoutlinebackground?, layout? )>
<!ATTLIST toplevel
    normalcolor     %color;        #IMPLIED
    selectedcolor   %color;        #IMPLIED
    mouseovercolor  %color;        #IMPLIED
    >

<!ELEMENT sublevel ( font?, eoutlinebackground?, layout? )>
<!ATTLIST sublevel
    normalcolor     %color;        #IMPLIED
    selectedcolor   %color;        #IMPLIED
    mouseovercolor  %color;        #IMPLIED
    >

<!ELEMENT twistieimage ( imageref )>

<!-- an outline that has been embedded in a richtext item.  Not the outline design  -->

<!ELEMENT embeddedoutline ( control?, title?, toplevel?, sublevel?, twistieimage?, border? )>

<!-- Attributes for <embeddedoutline>:
    display:        only emitted when type='tree'  
    showtwistie:    Display a triangle that users click to see outline entries
                    (for type='tree' only).
    osstyletwistie: Use OS style twisties ('+' to expand, '-' to collapse).  Applies when
                    type='tree' only, and in that case, implicitly defaults to false.
    showviewcontents:
                    display folder or view contents in outline.  This is valid on with subscription and bookmark databases only.
    outline:        The name of the outline design
    database:        Database containing design element (optional). Can be a 
replica id or a special database keyword (one of %named.element.link.databases).
    showfolderunread:
                    show folder's unread information
    characters:     This attribute is only present when the widthtype is fixedcharacter.
    columnwidth:    in inches (in)
-->
<!ATTLIST embeddedoutline
    display         ( %outline.displaydirections; )
                                   "vertical"
    expand          ( %outline.expandtypes; )
                                   "saved"
    imagelabel      %string;       #IMPLIED
    name            %tstring;      #IMPLIED
    %direction.attrs;
    rootname        %tstring;      #IMPLIED
    samebackground  %boolean;      "false"
    samefont        %boolean;      "false"
    showtwistie     %boolean;      #IMPLIED
    osstyletwistie  %boolean;      #IMPLIED
    targetframe     %string;       #IMPLIED
    tileimage       %boolean;      #IMPLIED
    type            ( %outline.types; )
                                   "tree"
    useappletinbrowser
                    %boolean;      #IMPLIED
    width           %lenpct;       "100%"
    widthtype       ( %eoutline.sizetypes; )
                                   "fitwindow"
    height          %lenpct;       "1in"
    heighttype      ( %eoutline.sizetypes; )
                                   "fixed"
    scrollbars      %boolean;      "true"
    showviewcontents
                    %boolean;      "false"
    outline         %string;       #IMPLIED
    database        %string;       #IMPLIED
    showfolderunread
                    %boolean;      "false"
    characters      %integer;      #IMPLIED
    columnwidth     %length;       "0in"
    >

<!-- **** Embedded Folder Pane **** -->

<!ELEMENT embeddedfolderpane ( font? )>

<!-- **** Embedded View **** -->

<!ENTITY % embeddedview.display.types "
    html |
    javaapplet |
    designsettings
    ">

<!ENTITY % embedded.fit.types "
    fitwindow |
    fixed
    ">

<!ELEMENT sparefont ( font )>

<!ELEMENT embeddedview ( code*, sparefont?, border? )>

<!-- Attributes for <embeddedview>:
    name:           Name of view to embed.
    embeddedname:   Name of this embedded view.  This name allows you to specify an
                    embedded view as a target from another embedded view.
    sclickframe:    Single click frame target
    dclickframe:    Double click frame target
    height:         in inches
    database:       Database containing design element (optional). Can be a
replica id or a special database keyword (one of %named.element.link.databases).
-->
<!ATTLIST embeddedview
    name            %string;       #IMPLIED
    embeddedname    %string;       #IMPLIED
    sclickframe     %string;       #IMPLIED
    dclickframe     %string;       #IMPLIED
    usedefaultlines %boolean;      "true"
    displayusing    ( %embeddedview.display.types; )
                                   "javaapplet"
    linestodisplay  %integer;      "0"
    width           %lenpct;       #IMPLIED
    widthtype       ( %embedded.fit.types; )
                                   "fixed"
    height          %length;       #IMPLIED
    heighttype      ( %embedded.fit.types; )
                                   "fixed"
    scrollbars      %boolean;      "false"
    showheader      %boolean;      "true"
    selectionfollowsmouse
                    %boolean;      "false"
    transparentbackground
                    %boolean;      "false"
    showentriesaslinks
                    %boolean;      "false"
    showactionbar   %boolean;      "false"
    showselectionmargin
                    %boolean;      "false"
    database        %string;       #IMPLIED
    showcurrentthreadonly
                    %boolean;      "false"
    useviewsselectionmarginprop
                    %boolean;      "true"
    >

<!-- **** Embedded Date Picker **** -->

<!ELEMENT embeddeddatepicker ( font?, border?)>

<!-- Attributes for <embeddeddatepicker>:
    height:         in inches
    width:          in inches
-->
<!ATTLIST embeddeddatepicker
    headerbgcolor   %color;        "none"
    controlbgcolor  %color;        "none"
    textcolor       %color;        "black"
    targetframe     %string;       #IMPLIED
    proportional    %boolean;      "false"
    height          %length;       #IMPLIED
    heighttype      ( %embedded.fit.types; )
                                   "fixed"
    width           %length;       #IMPLIED
    widthtype       ( %embedded.fit.types; )
                                   "fixed"
    >

<!-- **** Embedded Navigator **** -->

<!ELEMENT embeddednavigator ( code? )>

<!-- Attributes for <embeddednavigator>:
    name:           emitted when the name is just a string.  Computed names are emitted as a code lement.
    istemplate:     Display navigator specified in form name when this form is used as a Navigator Template
    database:       Database containing design element (optional). Can be a replica id or a special database keyword (one of %named.element.link.databases).
-->
<!ATTLIST embeddednavigator
    name            %string;       #IMPLIED
    istemplate      %boolean;      "false"
    database        %string;       #IMPLIED
    >

<!-- **** Embedded File Upload Control **** -->

<!ELEMENT embeddedfileuploadcontrol EMPTY>
<!ATTLIST embeddedfileuploadcontrol
    %html.core.attrs;
    >

<!-- **** Imagemap/Embedded Imported Navigator **** -->

<!ELEMENT point EMPTY>
<!ATTLIST point
    x               %integer;      #IMPLIED
    y               %integer;      #IMPLIED
    >

<!ENTITY % area.type "
    circle |
    default |
    rectangle |
    polygon
    ">

<!ENTITY % area.link "%richtext.links; ">

<!-- For rectangles or circles, specify two points, the top left and bottom
     right.  (For circles, the points are for the surrounding rectangle.)
     For polygons, specify three or more points.
     For area type='default', specify no points. -->

<!ELEMENT area ( (point, point+)?, (%area.link;)?, code* )>
<!ATTLIST area
    type            ( %area.type; )
                                   #IMPLIED
    tabindex        %integer;      "0"
    %html.core.attrs;
    alttext         %string;       #IMPLIED
    targetframe     %string;       #IMPLIED
    >

<!ELEMENT imagemap ( picture, area+ )>
<!ATTLIST imagemap
    name            %tstring;      #IMPLIED
    lastdefaultid   %integer;      #IMPLIED
    lastrectangleid %integer;      #IMPLIED
    lastcircleid    %integer;      #IMPLIED
    lastpolygonid   %integer;      #IMPLIED
    >

<!-- **** Embedded Control **** -->

<!ELEMENT keyword ( #PCDATA )*>
<!ATTLIST keyword
    on              %boolean;      "false"
    >

<!ELEMENT embeddedkeywords ( keyword* )>

<!ENTITY % embeddedcontrol.type "
    checkbox |
    combobox |
    edit |
    listbox |
    radiobutton |
    datetime |
    timezone |
    color
    ">

<!ELEMENT embeddedcontrol ( text?, font?, embeddedkeywords? )>
<!ATTLIST embeddedcontrol
    type            ( %embeddedcontrol.type; )
                                   #IMPLIED
    borderstyle     ( %keywords.borders; )
                                   #IMPLIED
    columns         %integer;      "1"
    alignwithbaseline
                    %boolean;      "false"
    allowmultilines %boolean;      "true"
    %reading.order.attrs;
    width           %lenpct;       #IMPLIED
    widthtype       ( %embedded.fit.types; )
                                   "fixed"
    height          %length;       #IMPLIED
    bgcolor         %color;        #IMPLIED
    >

<!-- **** Named Element Reference **** -->

<!ENTITY % namedelementref.type "
    htmlfile |
    scriptlibrary |
    stylesheet
    ">

<!-- Used for named elements that are not links -->

<!ELEMENT namedelementref EMPTY>

<!-- Attributes for <namedelementref>:
    database:       Database containing design element (optional). Can be a replica ID
or a special database keyword (one of %named.element.link.databases).
-->
<!ATTLIST namedelementref
    name            %tstring;      #REQUIRED
    type            ( %namedelementref.type; )
                                   #REQUIRED
    database        %string;       #IMPLIED
    >

<!-- uninterpreted rich text data. -->

<!ELEMENT richtextdata %binary;>
<!ATTLIST richtextdata
    type            %hex;          #REQUIRED
    >

<!-- ******************************************************* -->
<!-- * Localization Formats                                * -->
<!-- ******************************************************* -->

<!-- **** Datetimes **** -->

<!-- Choices:
    year4monthday:  DEPRECATED.  Use yearmonthday instead and set fourdigityear to true.
    year4month:     DEPRECATED.  Use yearmonth instead and set fourdigityear to true.
-->

<!ENTITY % datetimeformat.date "
    yearmonthday |
    year4monthday |
    monthday |
    yearmonth |
    year4month |
    weekdaymonthdayyear |
    weekdaymonthday |
    weekday |
    month |
    day |
    year
    ">

<!ENTITY % datetimeformat.time "
    hourminutesecondhundredths |
    hourminutesecond |
    hourminute |
    hour
    ">

<!ENTITY % datetimeformat.zone "
    never |
    sometimes |
    always
    ">

<!-- Choices:
    datetimetoday:  DEPRECATED.  Use datetime instead and set showtodaywhenappropriate to true.
-->

<!ENTITY % datetimeformat.show "
    date |
    time |
    datetime |
    datetimetoday
    ">

<!ENTITY % datetimeformat.calendar "
    gregorian |
    hijri
    ">

<!-- Information about how datetimes should be formatted. -->

<!ELEMENT datetimeformat EMPTY>
<!ATTLIST datetimeformat
    show            ( %datetimeformat.show; )
                                   #IMPLIED
    date            ( %datetimeformat.date; )
                                   #IMPLIED
    showtodaywhenappropriate
                    %boolean;      "false"
    fourdigityear   %boolean;      "false"
    fourdigityearfor21stcentury
                    %boolean;      "false"
    omitthisyear    %boolean;      "false"
    time            ( %datetimeformat.time; )
                                   #IMPLIED
    zone            ( %datetimeformat.zone; )
                                   #IMPLIED
    calendar        ( %datetimeformat.calendar; )
                                   #IMPLIED
    >

<!-- **** Numbers **** -->

<!ENTITY % numberformat.formats "
    general |
    fixed |
    scientific |
    currency
    ">

<!-- Information about how numbers should be formatted -->

<!ELEMENT numberformat EMPTY>

<!-- Attributes for <numberformat>:
    digits:         The number of fractional digits (0-15) or "varying".
-->
<!ATTLIST numberformat
    digits          %string;       "varying"
    format          ( %numberformat.formats; )
                                   #IMPLIED
    punctuated      %boolean;      #IMPLIED
    parens          %boolean;      #IMPLIED
    percent         %boolean;      #IMPLIED
    >

<!-- **** Names **** -->

<!ENTITY % verticalorientation.formats "
    top |
    middle |
    bottom
    ">
<!-- Information about how numbers should be formatted -->

<!ELEMENT columnnamesformat EMPTY>

<!-- Attributes for <columnnamesformat> -->
<!ATTLIST columnnamesformat
    showonline     	    %boolean;      "false"
    columncontainsname      %boolean;      "false"	
    columnname		    %string;	   #IMPLIED
    verticalorientation     ( %verticalorientation.formats;)
					   #IMPLIED
    >



<!-- ******************************************************* -->
<!-- * Design Elements                                     * -->
<!-- ******************************************************* -->

<!--
This entity isn't actually used in the DTD, but defines the valid tokens that
can appear in the hide= attribute on design notes.
v4:       Hides from V4 or later clients.
v4strict: Hides from V4 clients only.
v5:		  Is not yet used.
notes	  Hides from a notes client.
web:	  Hides from a web client.
mobile:	  Hides from a mobile client.
-->

<!ENTITY % design.note.hide.tokens "
    v3 |
    v4 |
    v4strict|
    v5 |
    notes |
    web |
    mobile
    ">

<!-- These are flags common to many design elements. -->

<!-- Attributes:
    hide:           A list of tokens from %design.note.hide.tokens;
    insertdialog:   Subforms with this "true" are offered in the Insert Subform dialog.
    newinsertdialog:
                    If "true" for a subform, the subform will be offered as
insertable when new forms are created.
    noreplace:      Prohibit design refresh or replace to modify
    readonly:       Applies only to certain design elements such as imageresource and for
those elements implicitly defaults to false.
    propagatenoreplace:
                    Proprogate this no refresh and no replace prohibition.
-->

<!ENTITY % design.flags "
    hide            %tokens;       #IMPLIED
    nocompose       %boolean;      #IMPLIED
    noquery         %boolean;      #IMPLIED
    norenderv3      %boolean;      #IMPLIED
    insertdialog    %boolean;      #IMPLIED
    newinsertdialog %boolean;      #IMPLIED
    otherdialog     %boolean;      #IMPLIED
    noreplace       %boolean;      'false'
    readonly        %boolean;      #IMPLIED
    propagatenoreplace
                    %boolean;      #IMPLIED
    ">

<!-- Flags about web behavior for design elements. -->

<!ENTITY % design.webflags "
    useapplet       %boolean;      'false'
    treatashtml     %boolean;      'false'
    htmlallfields   %boolean;      #IMPLIED
    ">

<!-- These are attributes that can be attached to any design element. -->

<!-- Attributes:
    default:        Some kinds of design elements (forms and views, for example) can have
default instances. This attribute indicates which instance is the default.
    private:        Is this a private design element?
    designerversion:
                    The version of the Designer needed to successfully
edit this design element.
    fromtemplate:   The name of the template this design element is inherited from.
-->

<!ENTITY % design.note.attrs "
    %note.attrs;
    %design.flags;
    %design.webflags;
    publicaccess    %boolean;      #IMPLIED
    %language.attrs;
    default         %boolean;      'false'
    private         %boolean;      'false'
    designerversion %string;       #IMPLIED
    fromtemplate    %string;       #IMPLIED
    ">

<!-- These are attributes that can be attached to any named design element. -->

<!-- Attributes:
    name:           The primary name for the design element
    alias:          The alias(es) for a named design element (multiple aliases separated by '|')
    comment:        A comment for the design element.
-->

<!ENTITY % named.design.note.attrs "
    %design.note.attrs;
    name            %tstring;      #IMPLIED
    alias           %tstring;      #IMPLIED
    comment         %tstring;      #IMPLIED
    ">

<!-- Attribute: renderpassthrough
		 to specify render passthrough html in client -->

<!ENTITY % renderpassthrough.attrs "
	renderpassthrough	%boolean;	'false'
	">

<!-- The content that appears at the front of any design element. -->

<!ENTITY % design.note.prolog "%note.prolog;">

<!-- The list of people who have updated this note. -->

<!ELEMENT updatedby ( name )*>

<!-- A list of date/times when the note was revised. -->

<!ELEMENT revisions ( datetime )*>

<!-- The content that appears at the front of any named design element. -->

<!ENTITY % named.design.note.prolog "%design.note.prolog;">

<!-- **** Forms, Subforms, Pages, etc. **** -->

<!ENTITY % form.types "
    document |
    response |
    responsetoresponse
    ">

<!ENTITY % form.versions "
    none |
    newresponse |
    oldresponse |
    newsibling
    ">

<!ENTITY % form.inheritdocs "
    none |
    link |
    richtext |
    collapsed
    ">

<!ENTITY % form.contextpanes "
    hide |
    link |
    parent
    ">

<!ENTITY % link.color.attrs "
    activelinkcolor %color;        #IMPLIED
    visitedlinkcolor
                    %color;        #IMPLIED
    unvisitedlinkcolor
                    %color;        #IMPLIED
    ">

<!ENTITY % form.focus.attrs "
    noinitialfocus  %boolean;      'false'
    nofocusonf6     %boolean;      'false'
    ">

<!ENTITY % form.fieldindex.attrs "
    nofieldindex    %boolean;      'false'
    ">

<!ENTITY % form.conflictactions "
	createconflicts |
	donotcreateconflicts |
	mergeconflicts |
	mergenoconflicts
	">

<!ELEMENT form ( %named.design.note.prolog; , globals?, code*, actionbar?, background?, body,%note.epilog; )>

<!-- Attributes for <form>:
    type:           What type (if any) of response document does this form create?
    recalc:         Are fields auto-recalced?
    editonopen:     Force the document into edit mode when opened.
	mergeconflicts	DEPRECATED, replaced by conflictactions
    resourcename    Data source option - Default data connection
    metadataname    Data source option - Default metadata object
    allowautosave   Allow documents using this form to be auto-saved
    nofieldindex    Do not add field names to field index
-->
<!ATTLIST form
    %named.design.note.attrs;
    %link.color.attrs;
    %reading.order.attrs;
    bgcolor         %color;        #IMPLIED
    inherit         %boolean;      "false"
    mailable        %boolean;      "false"
    type            ( %form.types; )
                                   "document"
    recalc          %boolean;      "false"
    storeform       %boolean;      "false"
    editonopen      %boolean;      "false"
    anonymous       %boolean;      "false"
    nofieldexchange %boolean;      "false"
    versions        ( %form.versions; )
                                   "none"
    manualversion   %boolean;      "false"
    inheritdoc      ( %form.inheritdocs; )
                                   "none"
    inheritdocfield %string;       #IMPLIED
    contextpane     ( %form.contextpanes; )
                                   "hide"
    mergeconflicts  %boolean;      #IMPLIED
	conflictaction	( %form.conflictactions; )
								   "createconflicts"
    %form.focus.attrs;
    signdocuments   %boolean;      "false"
    resourcename    %string;       #IMPLIED
    metadataname    %string;       #IMPLIED
    %renderpassthrough.attrs; 
    allowautosave   %boolean;      "false"
    %form.fieldindex.attrs;
    >

<!ELEMENT subform ( %named.design.note.prolog; , globals?, code*, actionbar?, body, %note.epilog; )>
<!ATTLIST subform
    %named.design.note.attrs;
    %renderpassthrough.attrs; 
    %form.fieldindex.attrs;
    >

<!ELEMENT page ( %named.design.note.prolog; , globals?, code*, actionbar?, background?, body, %note.epilog; )>
<!ATTLIST page
    %named.design.note.attrs;
    %link.color.attrs;
    %reading.order.attrs;
    bgcolor         %color;        #IMPLIED
    %form.focus.attrs;
    %renderpassthrough.attrs; 
    >

<!ELEMENT helpaboutdocument ( %design.note.prolog; , background?, body, %note.epilog; )>
<!ATTLIST helpaboutdocument
    %design.note.attrs;
    bgcolor         %color;        #IMPLIED
    %renderpassthrough.attrs; 
    >

<!ELEMENT helpusingdocument ( %design.note.prolog; , background?, body, %note.epilog; )>
<!ATTLIST helpusingdocument
    %design.note.attrs;
    bgcolor         %color;        #IMPLIED
    %renderpassthrough.attrs; 
    >

<!-- Definition of a shared field. -->

<!ELEMENT sharedfield ( %named.design.note.prolog; , field, %note.epilog; )>
<!ATTLIST sharedfield
    %named.design.note.attrs;
    >

<!ELEMENT body ( richtext )>

<!-- **** Data Connection **** -->

<!ENTITY % dataconnection.class "
    rdbms
    ">

<!ENTITY % dataconnection.types "
    db2 |
    oracle |
    sybase |
    odbc2 |
    oracle8 |
    oledb
    ">

<!ENTITY % dataconnect.spacetrim.values "
    none |
    nonkeyfields |
    allfields
    ">

<!ENTITY % dataconnection.onmissingrecord.values "
    error |
    ignore |
    externalrecord
    ">

<!ENTITY % dataconnection.ondatamismatch.values "
    error |
    precisionloss |
    datatruncation
    ">

<!ENTITY % dataconnection.object.types "
    table |
    view |
    procedure
    ">

<!ENTITY % db2properties "
    datajournaling  %boolean;      #IMPLIED
    ">

<!ENTITY % oledbproperties "
    oledbprovider   %string;       #IMPLIED
    oledbdatasource %string;       #IMPLIED
    oledbdatabase   %string;       #IMPLIED
    oledbproviderstring
                    %string;       #IMPLIED
    oledbauthentication
                    %string;       #IMPLIED
    ">

<!ENTITY % odbcproperties "
    singlethreading %boolean;      #IMPLIED
    ">

<!--
Properties that are specific to particular dataconnection types.  The groups of
attributes contained here are mutually exclusive.
-->

<!ENTITY % dataconnection.customizedproperties.values "
    %db2properties;
    %oledbproperties;
    %odbcproperties;
    ">

<!ELEMENT dataconnection ( %named.design.note.prolog; , %note.epilog; )>
<!ATTLIST dataconnection
    %named.design.note.attrs;
    class           ( %dataconnection.class; )
                                   #REQUIRED
    type            ( %dataconnection.types; )
                                   #REQUIRED
    username        %string;       #IMPLIED
    password        %string;       #IMPLIED
    database        %string;       #IMPLIED
    hoststring      %string;       #IMPLIED
    sqlserver       %string;       #IMPLIED
    datasource      %string;       #IMPLIED
    objecttype      ( %dataconnection.object.types; )
                                   #IMPLIED
    objectowner     %string;       #IMPLIED
    objectname      %string;       #IMPLIED
    objectopen      %string;       #IMPLIED
    objectupdate    %string;       #IMPLIED
    objectcreate    %string;       #IMPLIED
    objectdelete    %string;       #IMPLIED
    connections     %integer;      "1"
    blockkeyfieldupdates
                    %boolean;      "false"
    updatechangedfieldsonly
                    %boolean;      "false"
    disablehttpcaching
                    %boolean;      "false"
    fieldsgetdecserrors
                    %boolean;      "false"
    spacetrim       ( %dataconnect.spacetrim.values; )
                                   "none"
    conflictdetection
                    %boolean;      "false"
    ondatamismatch  ( %dataconnection.ondatamismatch.values; )
                                   "precisionloss"
    onmissingrecord ( %dataconnection.onmissingrecord.values; )
                                   "error"
    %dataconnection.customizedproperties.values;
    >

<!-- **** Events **** -->

<!ENTITY % code.lotusscript.events "
    initialize |
    terminate |
    entering |
    exiting |
    onchange |
    objectexecute
    ">

<!-- Choices:
    showsinglecategory:
                    used with embedded views.  Limits the embedded view to one category based on a formula (or text)
    label:          Specifies the label for something, such as an action.
    displayvalue:   Specifies the value to display for something, such as a boolean value for a
checkbox action.
-->

<!ENTITY % code.formula.events "
    defaultvalue |
    inputtranslation |
    inputvalidation |
    windowtitle |
    webqueryopen |
    webquerysave |
    hidewhen |
    value |
    selection |
    htmlattributes |
    htmlhead |
    htmlbody |
    targetframe |
    helprequest |
    form |
    alternatehtml |
    showsinglecategory |
    label |
    displayvalue |
    inputenabled
    ">

<!ENTITY % code.databasescript.lotuscript.or.formula.events "
    querydocumentdelete |
    querydocumentundelete |
    postdocumentdelete |
    querydroptoarchive |
    postdroptoarchive
    ">

<!ENTITY % code.lotusscript.or.formula.events "
    click |
    onhelp |
    postopen |
    queryclose |
    queryopen |
    queryrecalc |
    postrecalc |
    querysave |
    querymodechange |
    postmodechange |
    postsave |
    querysend |
    postsend |
    action |
    regiondoubleclick |
    queryopendocument |
    queryaddtofolder |
    querydragdrop |
    querypaste |
    postdragdrop |
    postpaste |
    onload |
    onunload |
    onsubmit |
    queryentryresize |
    postentryresize |
    %code.databasescript.lotuscript.or.formula.events;
    ">

<!-- Choices:
    library:        A pseudo-event which identifies the code in a script library
-->

<!ENTITY % code.javascript.events "
    onClick |
    onDblClick |
    onMouseDown |
    onMouseUp |
    onMouseOver |
    onMouseMove |
    onMouseOut |
    onKeyPress |
    onKeyDown |
    onKeyUp |
    onFocus |
    onBlur |
    onLoad |
    onUnload |
    onSubmit |
    onReset |
    onChange |
    onError |
    onHelp |
    onSelect |
    Queryopen |
    Queryrecalc |
    Postrecalc |
    Querymodechange |
    Postmodechange |
    Postsave |
    Querysend |
    Postsend |
    library
    ">

<!ENTITY % code.events "
    %code.formula.events; |
    %code.lotusscript.events; |
    %code.lotusscript.or.formula.events; |
    %code.javascript.events;
    ">

<!ENTITY % code.lotusscript.sections "
    options |
    declarations
    ">

<!ENTITY % code.javascript.sections "
    jsheader
    ">

<!ENTITY % code.sections "
    %code.lotusscript.sections; |
    %code.javascript.sections;
    ">

<!-- Chooses within which applications a particular piece of code is to run. -->

<!ENTITY % code.for.tokens "
    web |
    client
    ">

<!ENTITY % code.types "
    formula |
    javascript |
    lotusscript |
    javaproject |
    simpleaction+
    ">

<!--
A container for code of any kind. The name=, event=, and section= attributes
all identify the purpose of the code. Valid DXL contains one and only one of
these three attributes.
-->

<!ELEMENT code ( %code.types; )>

<!-- Attributes for <code>:
    event:          The name of a built-in event or user-defined LotusScript function.
    for:            A list of keywords from %code.for.tokens.  For many code elements, this
information is implied, for example by the type of code or by a specific event,
to have a particular single value.  This attribute need only be specified in
those places where the Notes Designer allows for more than one possibility, and
in those cases it defaults to "client web" (e.g. for JavaScript code).
Note that documents/design elements whose ODS representation is pre-R6 do not
allow for separate client and web code; in those cases, for="web" will have the
same meaning as for="client web".
    enabled:        Only valid in those places where the Notes UI allows you to specify code
but not check the box to enable the code, e.g. the hide when formula for a
paragraph.  When valid, defaults to true.
-->
<!ATTLIST code
    event           %string;       #REQUIRED
    for             %tokens;       #IMPLIED
    enabled         %boolean;      #IMPLIED
    >

<!ELEMENT javascript ( #PCDATA  | nonxmlchar)*>

<!ELEMENT lotusscript ( #PCDATA  | nonxmlchar)*>

<!ELEMENT java ( #PCDATA  | nonxmlchar)*>

<!-- Attributes for <java>:
    name:           The name of the Java source element; use JavaAgent.java for the primary
class for an agent.
-->
<!ATTLIST java
    name            %string;       #REQUIRED
    >

<!--
A Java project - holds multiple Java sources, resources, and archives, and
references to Java script libraries and applet resource files.
-->

<!ELEMENT javaproject ( (java | javaresource | javaarchive | sharedlibraryref | appletresourcefileref)* )>

<!-- Attributes for <javaproject>:
    class:          The name of the primary Java class; use JavaAgent.class for agents.
This is a required attribute except when contained within an <appletresource>.
    codepath:       Specifies the container of the Java files.  Value depends on the
context in which it is used.
Design elements that can contain Java code contain a <javaproject> whose codepath
defaults to the value that the Notes Designer stores.
<javaapplet> contains a <javaproject> whose codepath is 'notes:///./$FILE' if the
applet files are stored within Notes, and a URL if an applet on a Web server is
referenced.  In the latter case, the <javaproject> doesn't have any element
content.
Any use of <javaproject> can use a codepath which specifies a filesystem path for
a directory.  The Java files will thus be imported from the filesystem.  In this
case, the <java>, <javaresource>, and <javaarchive> do not have any content, only
the name attribute that specifies the file name.
    imported:       A value of true specifies Imported Java.  The default value of false
specifies Java.  From the perspective of the Notes Designer, Imported Java code
must be imported from the filesystem (or script libraries), thus the
<javaproject> must specify a codepath that, together with the name attribute on
<java>, <javaresource>, and <javaarchive> elements, specifies the full path of
each file.  These elements may have content, which means that they are created on
import from the content rather than from the filesystem files, but the codepath
is retained on import for purposes of re-importing from the filesystem files via
the Designer.
-->
<!ATTLIST javaproject
    class           %string;       #IMPLIED
    codepath        %string;       #IMPLIED
    imported        %boolean;      "false"
    >

<!--
A Java resource - class, gif, etc.  A Java source file, in its binary form, can
also be represented by this element.
-->

<!ELEMENT javaresource %binary;>
<!ATTLIST javaresource
    name            %string;       #REQUIRED
    >

<!ELEMENT javaarchive %binary;>
<!ATTLIST javaarchive
    name            %string;       #REQUIRED
    >

<!--
A reference to a file within an applet resource design element.  Used by
<javaproject> elements within a <javaapplet>.
-->

<!ELEMENT appletresourcefileref EMPTY>

<!-- Attributes for <appletresourcefileref>:
    database:       The replica ID of the database containing the applet resource.  If not
specified, it defaults to the current database.
    appletresource: The name of the applet resource design note.
    file:           The name of a file within the applet resource.
-->
<!ATTLIST appletresourcefileref
    database        %replicaid;    #IMPLIED
    appletresource  %tstring;      #REQUIRED
    file            %string;       #REQUIRED
    >

<!--
References a shared script library by name.  Used by <javaproject> elements
within design elements that contain Java code (e.g. agents and script libraries).
-->

<!ELEMENT sharedlibraryref EMPTY>
<!ATTLIST sharedlibraryref
    name            %tstring;      #REQUIRED
    >

<!--
The elements that can appear in a <simpleaction> - see below for which elements
appear in which contexts.
-->

<!ENTITY % simple.actions "
    modifybyformaction |
    sendreplyaction |
    sendmailaction |
    sendnewsletteraction |
    formula
    ">

<!--
The types of simple actions that can be specified.  For each possibility, specify
the additional attribute(s) and/or element(s) indicated, if any.
-->

<!-- Choices:
    copytodatabase: Specify server and file
    copytofolder:   Specify folder
    modifyfield:    Specify field, value, and appendvalue
    modifybyform:   Specify <modifybyformaction>
    movetofolder:   Specify folder
    removefromfolder:
                    Specify folder
    sendreply:      Specify <sendreplyaction>
    runagent:       Specify agent
    sendmail:       Specify <sendmailaction>
    sendnewsletter: Specify <sendnewsletteraction>
    runformula:     Specify formulaaction and <formula>
-->

<!ENTITY % simpleaction.types "
    copytodatabase |
    copytofolder |
    delete |
    markread |
    markunread |
    modifyfield |
    modifybyform |
    movetofolder |
    removefromfolder |
    sendreply |
    runagent |
    send |
    sendmail |
    sendnewsletter |
    runformula
    ">

<!--
For agents or simple actions that contain formulas, this specifies the formula
type.
-->

<!-- Choices:
    modifydocs:     Formula modifies documents
    createdocs:     Formula creates new documents
    selectdocs:     Formula selects documents
-->

<!ENTITY % formula.types "
    modifydocs |
    createdocs |
    selectdocs
    ">

<!ELEMENT simpleaction ( (%simple.actions;)? )>

<!-- Attributes for <simpleaction>:
    folder:         Folder name, for copytofolder, movetofolder, removefromfolder actions
    agent:          Agent name, for runagent action
    server:         Server name, for copytodatabase action
    file:           File name, for copytodatabase action
    field:          Field name, for modifyfield action
    value:          Value string, for modifyfield action.  This is a text value regardless of
the data type of the field.  Notes will do any necessary conversion when writing
the field value.
    appendvalue:    For modifyfield action, specifies that the specified value is
appended to the existing value.  Default behavior is to replace the existing
value with the specified value.
    formulatype:    For a runformula action, specifies whether the action updates
existing documents (the default), creates new documents, or selects documents.
-->
<!ATTLIST simpleaction
    action          (%simpleaction.types;)
                                   #REQUIRED
    folder          %tstring;      #IMPLIED
    agent           %tstring;      #IMPLIED
    server          %string;       #IMPLIED
    file            %string;       #IMPLIED
    field           %string;       #IMPLIED
    value           %string;       #IMPLIED
    appendvalue     %boolean;      #IMPLIED
    formulatype     (%formula.types;)
                                   #IMPLIED
    >

<!-- Modify Fields By Form simple action -->

<!ELEMENT modifybyformaction (fieldchoice*)>

<!-- Attributes for <modifybyformaction>:
    form:           The name of the form
-->
<!ATTLIST modifybyformaction
    form            %tstring;      #REQUIRED
    >

<!--
Specifies a field within a modifybyformaction or a byfield search.  The content
is the value of the field.
-->

<!ELEMENT fieldchoice ( %simple.types; | %item.complex.types; )>

<!-- Attributes for <fieldchoice>:
    name:           The field name
-->
<!ATTLIST fieldchoice
    name            %string;       #REQUIRED
    >

<!-- Contains the body of the reply message -->

<!ELEMENT sendreplyaction (text?)>

<!-- Attributes for <sendreplyaction>:
    replytoall:     Specifies to reply to the sender and all recipients.  By default,
reply is to the sender only.
    includedocument:
                    Specifies to include the original document content in the reply.
By default, it is not included.
    replyonce:      Specifies to reply only once to any recipient.  By default, a
recipient may get multiple replies if listed more than once as a recipient in the
original message.
-->
<!ATTLIST sendreplyaction
    replytoall      %boolean;      "false"
    includedocument %boolean;      "false"
    replyonce       %boolean;      "false"
    >

<!-- Send Mail Message simple action. -->

<!ELEMENT sendmailaction (sendto, sendcc?, sendbcc?, sendsubject?, text?)>

<!-- Attributes for <sendmailaction>:
    includedocument:
                    Specifies to include the original document content in the
message.  By default, it is not included.
    includelink:    Specifies to include a link to the original document in the message.
By default, it is not included.
-->
<!ATTLIST sendmailaction
    includedocument %boolean;      "false"
    includelink     %boolean;      "false"
    >

<!-- The types that can be used to specify the content of a message to send. -->

<!ENTITY % send.value.types "
    text |
    textlist |
    formula
    ">

<!-- The list of To: users to send to -->

<!ELEMENT sendto ( %send.value.types; )>

<!-- The list of Cc: users to send to -->

<!ELEMENT sendcc ( %send.value.types; )>

<!-- The list of Bcc: users to send to -->

<!ELEMENT sendbcc ( %send.value.types; )>

<!-- The subject of the message being sent -->

<!ELEMENT sendsubject ( %send.value.types; )>

<!-- Send Newsletter Summary simple action. -->

<!ELEMENT sendnewsletteraction (sendto, sendcc?, sendbcc?, sendsubject?, text?)>

<!-- Attributes for <sendnewsletteraction>:
    view:           The name of the view from which to compose the summary
    gather:         Gather at least this many documents before mailing
    summary:        Include summary for each document using view.
-->
<!ATTLIST sendnewsletteraction
    view            %tstring;      #IMPLIED
    gather          %integer;      #IMPLIED
    summary         %boolean;      "true"
    >

<!--
Contained within many design elements, this holds the global code that applies to
the design element and anything it contains.  Code within this element can only
contain options and declarations sections, and initialize and terminate events,
and the contained element within the code element must be lotusscript.  Design
elements that have globals can also contain the same two sections and two events
as direct child code elements; those apply only to the design element but not to
other elements it contains.
-->

<!ELEMENT globals ( code+ )>

<!-- **** Database Scripts **** -->

<!ELEMENT databasescript (  %named.design.note.prolog;, code*, item* )>
<!ATTLIST databasescript
    %design.note.attrs;
    >

<!-- **** Fields **** -->

<!ENTITY % field.types "
    text |
    number |
    datetime |
    richtext |
    keyword |
    names |
    authors |
    readers |
    password |
    formula |
    timezone |
    richtextlite |
    color
    ">

<!ENTITY % field.choicesdialogs "
    none |
    addressbook |
    acl |
    view
    ">

<!ENTITY % dataconnectionfield.types "
    key |
    data
    ">

<!ENTITY % datasource.attrs "
    externalname    %string;       #IMPLIED
    metadataname    %string;       #IMPLIED
    dataconnectionresource
                    %string;       #IMPLIED
    storelocally    %boolean;      'false'
    dataconnectionfield
                    ( %dataconnectionfield.types; )
                                   'data'
    ">

<!ENTITY % field.heights "
    fixed |
    dynamic |
    proportional
    ">

<!ENTITY % field.limitinput.kinds "
    picture |
    sharedimage |
    attachment |
    view |
    datepicker |
    sharedapplet |
    text |
    object |
    calendar |
    inbox
    ">

<!ENTITY % field.limitinput.actions "
    help |
    clear
    ">

<!ENTITY % field.limitinput.values "
    %field.limitinput.kinds; |
    %field.limitinput.actions;
    ">

<!-- Choices:
    htmlmime:       Store rich text as HTML and MIME.
-->

<!ENTITY % field.storageformat.type "
    htmlmime
    ">

<!--
Represents a field on a form.

The font for the field is part of an enclosing <run> element.
Shared fields are represented by <sharedfieldref>.
-->

<!ELEMENT field ( keywords?, datetimeformat?, numberformat?, code* )>

<!-- Attributes for <field>:
    name:           The field name (required).
    type:           The field data type (required).
    kind:           Is this field editable or computed?
    allowmultivalues:
                    Does the field accept multiple values?
    description:    The help description for the field.
    taborder:       Order of this field when tabbing between fields.
    choicesdialog:  Dialog used to select choices for a keyword or names field.
    view:           View to use for choices="viewdialog".
    viewdatabase:   Database containing view for choices="viewdialog".
    viewcolumn:     View column for choices="viewdialog".
    lookupeachchar: Look up names as each character is typed?
    protected:      Should editor access be required to use this field?
    sign:           Should this field be signed if mailed or saved in a section?
    seal:           Can this field can be encrypted?
    listinputseparators:
                    The separators accepted between input list elements. A list
of the keywords in %list.separators;
    listdisplayseparator:
                    The separator used when displaying list elements.
    computeaftervalidation:
                    Compute this field after validation?
    defaultfocus:   Many fields can have this attribute: only the first gets
the default focus.
    showdelimiters: Show field delimiters in edit mode?
    allowtabout:    Allow tab key to exit field?
    useappletinbrowser:
                    Display rich text field using Java applet rather than HTML?
    runexitingonchange:
                    Run Exiting event after time/date change? Only applicable to
time/date fields.
    literalize:     Only for formula fields: Rather than computing the formula, just turn
item names into literals with the items' current values.
	externaldatasource:
					DEPRECATED: Never emitted by Exporter and ignored by Importer.
                    Importer determines that a field has an external data source
                    via the presence of a nonempty dataconnectionresource attribute.
    usenotesstyle:  Use Notes style vs. native OS style or calendar control.
    width:          Field width, used only for fields that don't use Notes style.
    height:         Field height, used only for fields that don't use Notes style.
    heighttype:     Fixed or dynamic field height. Used only for fields that don't use
Notes style.
    alignwithparagraph:
                    If usenotesstyle='false', specifies to align control's with paragraph's baseline.
    multiline:      For field types that allow it, specifies whether to allow multiple lines of display.
    fieldhint:      Field hint text.
    useoscontrolinbrowser:
                    For field types that allow it, specifies to use the "best
fit" operating system control to display the field in a browser.  If true,
overrides the useappletinbrowser attribute if it is also true.
    onlyallow:      Only applies when type='richtextlite'.  A list of values from
%field.limitinput.values of which constructs and actions are allowed in the Rich
Text Lite field.  Rich text constructs that are not in the list will not be
allowed by the Notes Editor to be entered into the field.
    firstdisplay:   Only applies when type='richtextlite'.  Specifies which of the
values from the onlyallow attribute will be the first choice displayed by the
Notes Editor when entering data into the Rich Text Lite field.
    fieldhelp:      Field help text.  Only applies when type='richtextlite'.
    storageformat:  how the contents if a rich text item is stored.
    bgcolor:        The field background color, only relevant if usenotesstyle='false', in
which case it defaults to 'system'.
-->
<!ATTLIST field
    name            %string;       #REQUIRED
    type            ( %field.types; )
                                   #REQUIRED
    kind            ( %field.kinds; )
                                   "editable"
    allowmultivalues
                    %boolean;      "false"
    description     %tstring;      #IMPLIED
    taborder        %integer;      #IMPLIED
    choicesdialog   ( %field.choicesdialogs; )
                                   #IMPLIED
    view            CDATA          #IMPLIED
    viewdatabase    CDATA          #IMPLIED
    viewcolumn      %integer;      #IMPLIED
    lookupeachchar  %boolean;      #IMPLIED
    protected       %boolean;      "false"
    sign            %boolean;      "false"
    seal            %boolean;      #IMPLIED
    listinputseparators
                    NMTOKENS       #IMPLIED
    listdisplayseparator
                    ( %list.separators; )
                                   #IMPLIED
    computeaftervalidation
                    %boolean;      "false"
    defaultfocus    %boolean;      "false"
    showdelimiters  %boolean;      "true"
    allowtabout     %boolean;      "false"
    useappletinbrowser
                    %boolean;      "false"
    runexitingonchange
                    %boolean;      #IMPLIED
    literalize      %boolean;      #IMPLIED
    externaldatasource
                    %boolean;      #IMPLIED
    usenotesstyle   %boolean;      #IMPLIED
    width           %lenpct;       #IMPLIED
    height          %length;       #IMPLIED
    heighttype      ( %field.heights; )
                                   #IMPLIED
    alignwithparagraph
                    %boolean;      #IMPLIED
    multiline       %boolean;      #IMPLIED
    fieldhint       %string;       #IMPLIED
    useoscontrolinbrowser
                    %boolean;      #IMPLIED
    onlyallow       %tokens;       #IMPLIED
    firstdisplay    ( %field.limitinput.kinds; )
                                   #IMPLIED
    fieldhelp       %string;       #IMPLIED
    %html.core.attrs;
    %datasource.attrs;
    storageformat   ( %field.storageformat.type; )
                                   #IMPLIED
    bgcolor         %color;        #IMPLIED
    >

<!ELEMENT sharedfieldref EMPTY>
<!ATTLIST sharedfieldref
    name            %string;       #REQUIRED
    >

<!--
This element appears in <field> only if <field type='keyword'>.
The content of <keywords> is the list of keywords, either literally, 
or a formula to compute them.
-->

<!ELEMENT keywords ( textlist | formula )?>
<!ATTLIST keywords
    ui              ( %keywords.ui; )
                                   "dialoglist"
    borderstyle     ( %keywords.borders; )
                                   "single"
    allownew        %boolean;      "false"
    recalconchange  %boolean;      #IMPLIED
    recalcchoices   %boolean;      "false"
    columns         %integer;      #IMPLIED
    helperbutton    %boolean;      "true"
    %reading.order.attrs;
    >

<!-- **** Subform references **** -->

<!-- Subform reference - either a subform name or a computed reference -->

<!ELEMENT subformref ( code? )>

<!-- Attributes for <subformref>:
    name:           The name of the referenced subform.
    database:       The replicaid of the database containing the subform.
                    The replicaid is represented as 1 to 16 hexadecimal digits.
                    The following values are also allowed to reference specific
                    commonly used databases:
                    mailfile, addressbook, subscriptions, bookmarks
-->
<!ATTLIST subformref
    name            %string;       #IMPLIED
    database        %string;       #IMPLIED
    >

<!-- **** Buttons **** -->

<!ENTITY % button.width.types "
    minimum |
    maximum |
    fixed |
    fitcontent |
    fixedcharacter
    ">

<!ENTITY % button.edge.types "
    system |
    square |
    rounded
    ">

<!ENTITY % button.types "
    normal |
    ok |
    cancel |
    help
    ">

<!-- A button. The label for the button is in the character content. -->

<!ELEMENT button ( #PCDATA | font | code )*>

<!-- Attributes for <button>:
    default:        Make this button the default button on a dialog box.
    characters:     Only present when widthtype is fixedcharacter - specifies the number
of characters for the button width.
    maxlines:       Only valid when widthtype is maximum - specifies the maximum number
                    of lines of text for the button label.  If not present it implicitly
                    defaults to 5.
-->
<!ATTLIST button
    name            CDATA          #IMPLIED
    width           %length;       #IMPLIED
    widthtype       ( %button.width.types; )
                                   #IMPLIED
    wraptext        %boolean;      #IMPLIED
    bgcolor         %color;        #IMPLIED
    type            ( %button.types; )
                                   "normal"
    default         %boolean;      "false"
    edge            ( %button.edge.types; )
                                   "system"
    characters      %integer;      #IMPLIED
    %html.core.attrs;
    %reading.order.attrs;
    maxlines        %integer;      #IMPLIED
    >

<!-- **** Actions **** -->

<!-- <font>: Button text font.  Should really be a child of <actionbuttonstyle>. -->

<!ELEMENT actionbar ( actionbarstyle?, actionbuttonstyle?, font?, border?, ( action | sharedactionref )* )>

<!-- Attributes for <actionbar>:
    bordercolor:    The action bar's border color, for compatibility with R5.
                    R6 supports the <border> child element, which specifies the
                    border color and additional border properties, and overrides
                    the bordercolor attribute.
-->
<!ATTLIST actionbar
    bgcolor         %color;        #IMPLIED
    bordercolor     %color;        #IMPLIED
    align           ( %lr.aligns; )
                                   "left"
    %language.attrs;
    useappletinbrowser
                    %boolean;      "false"
    >

<!ENTITY % actionbar.background.repeats "
    once |
    vrepeat |
    hrepeat |
    tile |
    centertile |
    resize |
    center
    ">

<!--
Holds action bar size and background properties.  The optional imageref content
specifies the action bar background image.  The optional font content is only
necessary if the height attribute is specified in ex units.
-->

<!ELEMENT actionbarstyle ( font?, imageref? )>

<!-- Attributes for <actionbarstyle>:
    height:         Action bar height in px or ex units.
    repeat:         If the action bar has a background image, this specifies the repeat pattern.
If omitted, 'tile' will be assumed.
-->
<!ATTLIST actionbarstyle
    height          %length;       #IMPLIED
    repeat          ( %actionbar.background.repeats; )
                                   #IMPLIED
    >

<!ENTITY % actionbutton.height.types "
    default |
    minimum |
    fixed |
    background
    ">

<!ENTITY % actionbutton.width.types "
    default |
    background |
    fixed
    ">

<!ENTITY % actionbutton.margin.types "
    default |
    fixed
    ">

<!ENTITY % actionbutton.displayborder.types "
    onmouseover |
    always |
    never |
    notesstyle
    ">

<!ELEMENT actionbuttonstyle ( imageref? )>

<!-- Attributes for <actionbuttonstyle>:
    height:         Button height in pixels, when heighttype=fixed
    width:          The button width, only if the width type is fixed.
    margintype:     The kind of margins above and below the buttons in the action bar.
    margin:         Button margin in pixels, when margintype=fixed
    internalmargin: The margin above and below the text in a button.
    showdropdown:   Should the dropdown arrow always be displayed (for an action with
children)?
-->
<!ATTLIST actionbuttonstyle
    bgcolor         %color;        #IMPLIED
    heighttype      ( %actionbutton.height.types; )
                                   "default"
    height          %integer;      #IMPLIED
    widthtype       ( %actionbutton.width.types; )
                                   "default"
    width           %pixels;       #IMPLIED
    margintype      ( %actionbutton.margin.types; )
                                   "default"
    margin          %integer;      #IMPLIED
    displayborder   ( %actionbutton.displayborder.types; )
                                   "onmouseover"
    textalign       ( %simple.aligns; )
                                   "left"
    internalmargin  %pixels;       "0"
    showdropdown    %boolean;      "false"
    >

<!ENTITY % action.types "
    button |
    checkbox |
    menuseparator
    ">

<!ENTITY % action.hide.tokens "
    read |
    edit |
    preview |
    previewedit |
    notes |
    web |
    mobile
    ">

<!ENTITY % action.systemcommands "
    categorize |
    edit |
    send |
    forward |
    movetofolder |
    removefromfolder
    ">

<!ENTITY % notesflow.publishing.attrs "
    publishonolelaunch
                    %boolean;      'false'
    closewhenchosen %boolean;      #IMPLIED
    docfocuswhenchosen
                    %boolean;      #IMPLIED
    ">

<!--
An action in the action bar. If the action uses a shared image for the graphic,
an <imageref> child element contains it.  Child <code> elements contain the code
to execute when the action is chosen, the action label formula (event='label'),
and the display value formula (event='displayvalue') for those action types that
support it.
-->

<!ELEMENT action ( imageref?, code* )>

<!-- Attributes for <action>:
    id:                  For actions in a shared action note, this attribute defines the shared
                         action's id.
    hide:                A list of tokens from %action.hide.tokens;
    icon:                The number of the built-in Notes icon to use for the action (if any).
    onlyiconinbar:       Should the text be omitted in the action bar?
    showrightbuttonmenu: New feature in R7.0. This action is under ActionInfo->Display Tab
			 Action is displayed when we right click the mouse button.
-->
<!ATTLIST action
    title           %tstring;      #IMPLIED
    id              %integer;      #IMPLIED
    displaytype     ( %action.types; )
                                   "button"
    targetframe     %string;       #IMPLIED
    hide            %tokens;       ""
    showinmenu      %boolean;      "true"
    showinbar       %boolean;      "true"
    showinrightbuttonmenu       
		   %boolean; 	   "false"
    systemcommand   ( %action.systemcommands; )
                                   #IMPLIED
    icon            %integer;      #IMPLIED
    graphicalign    ( %lr.aligns; )
                                   "left"
    align           ( %lr.aligns; )
                                   "left"
    onlyiconinbar   %boolean;      "false"
    %reading.order.attrs;
    %notesflow.publishing.attrs;
    >

<!ELEMENT sharedactionref EMPTY>
<!ATTLIST sharedactionref
    id              %integer;      #REQUIRED
    >

<!ELEMENT sharedactions ( %design.note.prolog; , action*, %note.epilog; )>

<!-- Attributes for <sharedactions>:
    maxid:          For a list of shared actions, this records the highest shared
action id used so far.
-->
<!ATTLIST sharedactions
    %design.note.attrs;
    maxid           %integer;      #IMPLIED
    >

<!-- **** Views **** -->

<!ENTITY % onopengoto.options "
    top |
    bottom |
    lastopened
    ">

<!ENTITY % onrefresh.options "
    refreshtop |
    refreshbottom |
    refresh |
    displayindicator
    ">

<!ENTITY % view.headers "
    none |
    simple |
    beveled |
    flat
    ">

<!ENTITY % view.rowspacings "
    1 |
    1.25 |
    1.5 |
    1.75 |
    2
    ">

<!ENTITY % view.unreadmarks "
    none |
    unreadonly |
    standard
    ">

<!ENTITY % grid.styles "
    none |
    solid |
    dash |
    dot |
    dashdot
    ">

<!--
indexrefresh time options: 
Auto, after first use: updates the view every time a user opens a view after the fist time
Automatic:updates view whether or not users open the database
Manual:relies on the user to refresh view.
Auto, atmost every n hours: controls how frequently the view index updates. Creates indexrefreshinterval attribute
-->
<!ENTITY % view.indexrefresh "
    autofirstuse |
    automatic |
    manual |
    autobyinterval 
    ">
 
<!--
indexdiscard time options:
After each use: deletes view index as soon as the user closes the database
If inactive for n days: deletes view index if the view hasn't been used in a specified number of days.
preserves view index and appends updates to the existing index.Creates indexdiscardinterval attribute
-->
<!ENTITY % view.indexdiscard "
    inactive45days |
    aftereachuse |
    inactivebyinterval 
    ">
<!-- Common attributes for <view> and <folder>. -->

<!ENTITY % view.and.folder.attrs "
    opencollapsed   %boolean;      'false'
    showresponsehierarchy
                    %boolean;      'false'
    unreadmarks     ( %view.unreadmarks; )
                                   #IMPLIED
    onopengoto      ( %onopengoto.options; )
                                   #IMPLIED
    onrefresh       ( %onrefresh.options; )
                                   #IMPLIED
    headers         ( %view.headers; )
                                   #IMPLIED
    showmargin      %boolean;      #IMPLIED
    extendlastcolumn
                    %boolean;      'false'
    bgcolor         %color;        #IMPLIED
    altrowcolor     %color;        #IMPLIED
    unreadcolor     %color;        #IMPLIED
    totalscolor     %color;        #IMPLIED
    shrinkrows      %boolean;      #IMPLIED
    rowlinecount    %integer;      #IMPLIED
    rowspacing      ( %view.rowspacings; )
                                   #IMPLIED
    headerlinecount %integer;      #IMPLIED
    uniquekeys      %boolean;      'false'
    defaultdesign   %boolean;      'false'
    showinmenu      %boolean;      'false'
    allowdocselection
                    %boolean;      'false'
    headerbgcolor   %color;        #IMPLIED
    hidemarginborder
                    %boolean;      #IMPLIED
    marginwidth     %pixels.1to4;  #IMPLIED
    marginbgcolor   %color;        #IMPLIED
    gridstyle       ( %grid.styles; )
                                   #IMPLIED
    gridcolor       %color;        #IMPLIED
    logviewupdates  %boolean;      #IMPLIED
    initialbuildrestricted
                    %boolean;      #IMPLIED
    noemptycategories
                    %boolean;      #IMPLIED
    evaluateactions %boolean;      #IMPLIED
    allownewdocuments
                    %boolean;      #IMPLIED
    allowcustomizations
                    %boolean;      #IMPLIED
    boldunreadrows  %boolean;      #IMPLIED
    transparentunreadrows
                    %boolean;      #IMPLIED
    colorizeicons   %boolean;      'false'
    indexrefresh    ( %view.indexrefresh; )
				   'autofirstuse'
    indexrefreshinterval 
		    %integer;	   #IMPLIED
    indexdiscard    ( %view.indexdiscard; )
				   'inactive45days'
    indexdiscardinterval 
		    %integer;      #IMPLIED
    launchframeset        %string;       #IMPLIED
    launchframe           %string;       #IMPLIED
    %direction.attrs;
    ">

<!-- The design of a view. -->

<!ELEMENT view ( %named.design.note.prolog; , globals?, code*, actionbar?, column*, viewbackground?, %note.epilog; )>

<!-- Attributes for <view>:
    noviewformat:   A special attribute that is only used for the minimal, untitled
view that is created when you create a new database using Notes.  Indicates that
the view has no explicit view formatting information.
-->
<!ATTLIST view
    %named.design.note.attrs;
    %link.color.attrs;
    %view.and.folder.attrs;
    noviewformat    %boolean;      "false"
    >

<!-- The design of a folder: very much like a view! -->

<!ELEMENT folder ( %named.design.note.prolog; , globals?, code*, actionbar?, column*, folderbackground?, %note.epilog; )>
<!ATTLIST folder
    %named.design.note.attrs;
    %link.color.attrs;
    %view.and.folder.attrs;
    >

<!ENTITY % sort.orders "
    ascending |
    descending |
    none
    ">

<!ENTITY % resort.options "
    %sort.orders; |
    both |
    toview
    ">

<!ENTITY % totals.options "
    none |
    total |
    averageperchild |
    percentoverall |
    percentparent |
    averageperentry
    ">

<!ELEMENT column ( font?, columnheader?, datetimeformat?, numberformat?, columnnamesformat?, code* )>
<!ATTLIST column
    align           ( %simple.aligns; )
                                   "left"
    showasicons     %boolean;      "false"
    resizable       %boolean;      "true"
    responsesonly   %boolean;      "false"
    hidden          %boolean;      "false"
    twisties        %boolean;      "false"
    sort            ( %sort.orders; )
                                   #IMPLIED
    sortnocase      %boolean;      #IMPLIED
    sortnoaccent    %boolean;      #IMPLIED
    separatemultiplevalues
                    %boolean;      "false"
    categorized     %boolean;      "false"
    resort          ( %resort.options; )
                                   #IMPLIED
    resorttoview    %string;       #IMPLIED
    resort2         ( %sort.orders; )
                                   #IMPLIED
    resort2column   %integer;      #IMPLIED
    totals          ( %totals.options; )
                                   #IMPLIED
    hidedetailrows  %boolean;      #IMPLIED
    showaslinks     %boolean;      #IMPLIED
    itemname        CDATA          #IMPLIED
    width           %number;       #IMPLIED
    listseparator   ( %list.separators; )
                                   #IMPLIED
    flatinr5        %boolean;      #IMPLIED
    %reading.order.attrs;
    >

<!ELEMENT columnheader ( font? )>
<!ATTLIST columnheader
    title           CDATA          #IMPLIED
    align           ( %simple.aligns; )
                                   "left"
    %reading.order.attrs;
    >

<!ELEMENT viewbackground ( imageref )>
<!ATTLIST viewbackground
    repeat          ( %cellbackground.repeats; )
                                   #IMPLIED
    >

<!ELEMENT folderbackground ( imageref )>
<!ATTLIST folderbackground
    repeat          ( %cellbackground.repeats; )
                                   #IMPLIED
    >

<!-- **** Agents **** -->

<!ENTITY % agent.restrictions "
    restricted |
    unrestricted |
    fulladminunrestricted
    ">

<!--
The documentset specifies the target documents on which the agent operates.  For
certain trigger types, the documentset is implied and thus should not be
specified in the agent.
-->

<!ELEMENT agent ( %named.design.note.prolog; , designchange?, trigger, documentset?, code*, rundata?, %note.epilog; )>

<!-- Attributes for <agent>:
    showinsearch:   Search part of this agent should be shown in the search bar.
    activatable:    For scheduled agents, can the agent be enabled/disabled?
    unrestrictedoperations:
                    DEPRECATED!!! Use restrictions instead.
    formulatype:    The formula type (if the agent contains a formula)
    profile:        Profile this agent each time the agent runs
-->
<!ATTLIST agent
    %named.design.note.attrs;
    enabled         %boolean;      "true"
    showinsearch    %boolean;      "false"
    runaswebuser    %boolean;      "false"
    runonbehalfof   %string;       #IMPLIED
    activatable     %boolean;      #IMPLIED
    unrestrictedoperations
                    %boolean;      #IMPLIED
    clientbackgroundthread
                    %boolean;      "false"
    allowremotedebugging
                    %boolean;      "false"
    storehighlights %boolean;      "false"
    formulatype     ( %formula.types; )
                                   "modifydocs"
    restrictions    ( %agent.restrictions; )
                                   "restricted"
    profile         %boolean;      "false"
    >

<!-- Time of last agent design change (not including enabled/disabled status) -->

<!ELEMENT designchange ( datetime )>

<!-- Choices:
    actionsmenu:    Manually from Actions menu
    agentlist:      Manually from agent list
    beforenewmail:  Before new mail arrives
    afternewmail:   After new mail has arrived
    docupdate:      If documents have been created or modified
    docpaste:       If documents have been pasted
    scheduled:      On a specified schedule
-->

<!ENTITY % agent.trigger.types "
    actionsmenu |
    agentlist |
    beforenewmail |
    afternewmail |
    docupdate |
    docpaste |
    scheduled
    ">

<!-- Specifies what triggers the execution of an agent. -->

<!ELEMENT trigger ( schedule? )>
<!ATTLIST trigger
    type            (%agent.trigger.types;)
                                   #REQUIRED
    >

<!-- Various units of time by which operations may be scheduled. -->

<!-- Choices:
    automatic:      Schedule is implied; for example for agents with trigger type='docupdate'
    byminutes:      More than once a day.  Use the minutes (and/or hours) attribute to
specify how often.
-->

<!ENTITY % schedule.types "
    automatic |
    byminutes |
    daily |
    weekly |
    monthly |
    never
    ">

<!-- Specifies the host system on which a scheduled operation runs. -->

<!-- Choices:
    local:          The local system
    any:            Any server system
    choose:         Choose when agent is enabled
    server:         A specific server specified by the runserver attribute
-->

<!ENTITY % schedule.runlocations "
    local |
    any |
    choose |
    server
    ">

<!ENTITY % day.names "
    sunday |
    monday |
    tuesday |
    wednesday |
    thursday |
    friday |
    saturday
    ">

<!-- Specifies a schedule that is used for the execution of code contained in a parent element. -->

<!ELEMENT schedule ( starttime?, endtime?, startdate?, enddate? )>

<!-- Attributes for <schedule>:
    hours:          Run once every N hours (can combine with minutes); must specify with type=frequently
    minutes:        Run once every M minutes (can combine with hours); must specify with type=frequently
    onweekends:     Scheduled operation can run on weekends (not applicable to weekly and monthly types)
    runserver:      If runlocation=server, this specifies the server name
    dayofweek:      Day of week on which scheduled operation executes; must be specified for type=weekly
    dateinmonth:    Date in month on which scheduled operation executes; must be specified for type=monthly
-->
<!ATTLIST schedule
    type            (%schedule.types;)
                                   #REQUIRED
    hours           %integer;      #IMPLIED
    minutes         %integer;      #IMPLIED
    onweekends      %boolean;      "true"
    runlocation     (%schedule.runlocations;)
                                   #IMPLIED
    runserver       %string;       #IMPLIED
    dayofweek       (%day.names;)  #IMPLIED
    dateinmonth     %integer;      #IMPLIED
    >

<!ELEMENT starttime ( datetime )>

<!ELEMENT endtime ( datetime )>

<!ELEMENT startdate ( datetime )>

<!ELEMENT enddate ( datetime )>

<!-- Specify a set of documents from a database. -->

<!-- Choices:
    modified:       All new and modified documents
    unreadinview:   All unread documents in view
    allinview:      All documents in view
    selected:       Selected documents
    runonce:        Run once (on current document)
    all:            All documents in database
-->

<!ENTITY % documentset.types "
    modified |
    unreadinview |
    allinview |
    selected |
    runonce |
    all
    ">

<!-- Specifies a set of documents on which an operation (e.g. excecution of an agent) operates. -->

<!ELEMENT documentset ( search* )>
<!ATTLIST documentset
    type            (%documentset.types;)
                                   #REQUIRED
    >

<!-- The elements that specify particular types of searches -->

<!ENTITY % searches "
    datechoice |
    formchoice |
    formfieldschoice |
    name |
    word
    ">

<!--
The types of searches that can be specified.  For each possibility, specify the
additional attribute(s) and/or element(s) indicated, if any.
-->

<!-- Choices:
    byauthor:       Specify contains attribute and one or more <name>s
    bydate:         Specify <datechoice>
    byfield:        Specify field and value, and optionally contains
    byformnames:    Specify one or more <formchoice>s
    byform:         Specify <formfieldschoice>
    infolder:       Specify folder and contains
    multiplewords:  Specify one or more <word>s and optionally the all attribute
-->

<!ENTITY % search.types "
    byauthor |
    bydate |
    byfield |
    byformnames |
    byform |
    infolder |
    multiplewords
    ">

<!--
Specifies a search query that is used to select a document set for an operation,
such as an agent.
-->

<!ELEMENT search ( (%searches;)* )>

<!-- Attributes for <search>:
    type:           The type of search
    folder:         The folder name for an infolder search
    field:          Field name, for byfield search
    contains:       Applies to byauthor, byfield, and infolder searches.  When true, which
is the implied default for these two search types, the search is for notes that
contain the specified data.  Use false to search for notes that do not contain
the specified data.
    value:          Value string, for byfield search.  This is a text value regardless of
the data type of the field.  Notes will do any necessary conversion when
searching for the field value.
    all:            Applies to multiplewords searches.  When false, which is the implied
default, the search is for notes that contain any of the specified words.
A value of true specifies a search for notes that contain all of the specified
words.
-->
<!ATTLIST search
    type            (%search.types;)
                                   #REQUIRED
    folder          %tstring;      #IMPLIED
    field           %string;       #IMPLIED
    contains        %boolean;      #IMPLIED
    value           %string;       #IMPLIED
    all             %boolean;      #IMPLIED
    >

<!--
The various ways to choose things based on dates.  For each condition, specify
the additional attribute(s) and/or element(s) indicated, if any.
-->

<!-- Choices:
    on:             Specify a single <datetime>
    after:          Specify a single <datetime>
    before:         Specify a single <datetime>
    noton:          Specify a single <datetime>
    inlast:         Specify days
    innext:         Specify days
    olderthan:      Specify days
    afternext:      Specify days
    between:        Specify two <datetime>s; the first is the start time and the second is
the end time
    notbetween:     Specify two <datetime>s; the first is the start time and the second
is the end time
-->

<!ENTITY % datechoice.conditions "
    on |
    after |
    before |
    noton |
    inlast |
    innext |
    olderthan |
    afternext |
    between |
    notbetween
    ">

<!--
Chooses things based on date(s).  For each condition, specify the additional
attribute(s) and/or element(s) indicated, if any.
If the condition attribute is on, after, before, noton, specify one datetime.
If the condition attribute is between, notbetween, specify two datetimes.
Otherwise, specify no datetimes.
-->

<!ELEMENT datechoice ( ( datetime, datetime? )? )>

<!-- Attributes for <datechoice>:
    modified:       When true, specifies that the search is for things that have been
modified within the specified time condition.  The default value of false causes
the search to be for things that have been created within the time criteria.
    condition:      Specifies the condition to be used to choose dates or date ranges
    days:           For certain conditions, specifies a number of days
-->
<!ATTLIST datechoice
    modified        %boolean;      "false"
    condition       (%datechoice.conditions;)
                                   #REQUIRED
    days            %integer;      #IMPLIED
    >

<!-- Chooses notes based on the form that they use -->

<!ELEMENT formchoice EMPTY>

<!-- Attributes for <formchoice>:
    name:           The form name
-->
<!ATTLIST formchoice
    name            %tstring;      #REQUIRED
    >

<!--
Chooses notes via specification of a form and fields within that form that
contain specific values.
-->

<!ELEMENT formfieldschoice ( fieldchoice* )>

<!-- Attributes for <formfieldschoice>:
    form:           The form name
-->
<!ATTLIST formfieldschoice
    form            %tstring;      #REQUIRED
    >

<!-- A single word used for searches, etc. -->

<!ELEMENT word ( #PCDATA )>

<!--
Contains agent run information.  It is exported for informational purposes, but
is never imported.
-->

<!ELEMENT rundata ( agentmodified?, agentrun?, runlog? )>

<!-- Attributes for <rundata>:
    processeddocs:  Number of documents processed on last agent run
    dbid:           dbid on which assistant was last run
    exitcode:       Exit code from last run of agent
    agentdata:      The UNID of the corresponding agent data note.
-->
<!ATTLIST rundata
    processeddocs   %integer;      #IMPLIED
    dbid            %dbid;         #IMPLIED
    exitcode        %integer;      #IMPLIED
    agentdata       %unid;         #IMPLIED
    >

<!-- Time of last agent modification -->

<!ELEMENT agentmodified ( datetime )>

<!-- Time of last agent run -->

<!ELEMENT agentrun ( datetime )>

<!-- A log of information from the last run of an agent -->

<!ELEMENT runlog ( #PCDATA )>

<!--
An agent data note is created and obtained via the Notes backend classes and is
populated by the agent code.  It can contain persistent data that is used from
run to run of an agent.  Agent data notes are not imported, but they are exported
for informational purposes.
-->

<!ELEMENT agentdata ( %design.note.prolog; , %note.epilog; )>
<!ATTLIST agentdata
    %root.attrs;
    >

<!-- **** Shared Code **** -->

<!-- A script library, which can contain LotusScript, Java, or Javascript code. -->

<!ELEMENT scriptlibrary ( %named.design.note.prolog; , code*, %note.epilog; )>
<!ATTLIST scriptlibrary
    %named.design.note.attrs;
    >

<!-- **** Resources **** -->

<!-- An image resource is stored in a note, and represented by <imageresource>. -->

<!ELEMENT imageresource ( %named.design.note.prolog;, ( %image.formats; ), %note.epilog; )>

<!-- Attributes for <imageresource>:
    imagename:      The name of the image if different than the name of the imageresource.
	refresh:        Indicates that the resource needs to be refreshed from its source location.
-->
<!ATTLIST imageresource
    %named.design.note.attrs;
    across          %integer;      "1"
    down            %integer;      "1"
    colorizegrays   %boolean;      "false"
    browsercompatible
                    %boolean;      "false"
    imagename       %string;       #IMPLIED
    refresh         %boolean;      "false"
    >

<!--
An Applet Resource design element (not to be confused with an applet within rich
text, javaapplet).  Also sometimes called a Java Resource.
The single code element contains a javaproject which contains the individual
files that comprise the applet resource.
-->

<!ELEMENT appletresource ( %named.design.note.prolog; , code, %note.epilog; )>
<!ATTLIST appletresource
    %named.design.note.attrs;
    >

<!-- **** Framesets **** -->

<!--
A frameset consists of 1 or more frames and/or nested framesets.
The optional code element specifies the window title of a toplevel frameset.
Note that only a toplevel frameset has the prolog and epilog elements.
-->

<!ELEMENT frameset ( %named.design.note.prolog;, code?, (frameset | frame)+, %note.epilog; )>

<!-- Attributes for <frameset>:
    rows:           A list of values, one for each row in the frameset, specifying the row sizes.
    columns:        A list of values, one for each column in the frameset, specifying the column sizes.
    spacing:        Spacing between frames.
    borderwidth:    Specified only on a top-level frameset; the default is "7px".
Value is the border width for all borders in the frameset.
    bordercolor:    Specified only on a top-level frameset; the default is "system".
Value is the border color for all borders in the frameset.
-->
<!ATTLIST frameset
    %named.design.note.attrs;
    rows            %pixpctrel.list;
                                   #IMPLIED
    columns         %pixpctrel.list;
                                   #IMPLIED
    spacing         %pixels;       "1px"
    %html.core.attrs;
    borderwidth     %pixels;       #IMPLIED
    bordercolor     %color;        #IMPLIED
    >

<!--
The elements that specify the contents of a frame are a subset of the link
elements that normally appear within <richtext>.  In the context of framesets,
there are additional limitations on these elements.  They must not contain
character data or richtext inline constructs, only an optional <code> element to
specify a formula for the URL or named element links.  Also, the %link.attrs and
description attribute do not apply.
-->

<!ENTITY % frame.value "
    doclink |
    viewlink |
    namedelementlink |
    urllink
    ">

<!ENTITY % frame.scrolling.values "
    always |
    never |
    auto |
    default
    ">

<!ELEMENT frame ( bordercaption?, (%frame.value;)? )>

<!-- Attributes for <frame>:
    showactionbar:  Valid only if frame references a view or folder, in which case it
defaults to "true".
    showheader:     Valid only if frame references a view or folder, in which case it
defaults to "true".
    selectionfollowsmouse:
                    Valid only if frame references a view or folder, in which
case it defaults to "false".
    basicappearance:
                    Valid only if frame references a view or folder, in which case
it defaults to "false".
    initialfocus:   A value of 'true' causes the focus to be on this frame when the
                    frameset is launched in the Notes client.
-->
<!ATTLIST frame
    name            %string;       #IMPLIED
    targetframe     %string;       #IMPLIED
    showactionbar   %boolean;      #IMPLIED
    showheader      %boolean;      #IMPLIED
    selectionfollowsmouse
                    %boolean;      #IMPLIED
    basicappearance %boolean;      #IMPLIED
    scrolling       (%frame.scrolling.values;)
                                   "default"
    noresize        %boolean;      "false"
    border3d        %boolean;      "true"
    marginwidth     %pixels;       "1px"
    marginheight    %pixels;       "1px"
    initialfocus    %boolean;      "false"
    %html.core.attrs;
    >

<!ENTITY % bordercaption.show.values "
    caption |
    arrows
    ">

<!--
Specifies text caption on a border.  The optional code element is a formula for
the caption text.  The optional font element specifies the font and color for the
caption text.
-->

<!ELEMENT bordercaption ( code?, font? )>

<!-- Attributes for <bordercaption>:
    show:           A list of keywords taken from %bordercaption.show.values;
    align:          When applicable (depending on show attribute), it defaults to "top".
    justify:        When applicable (depending on show attribute), it defaults to "left".
    open:           When applicable (depending on show attribute), it defaults to "0px".
-->
<!ATTLIST bordercaption
    show            %tokens;       ""
    align           (%edge.aligns;)
                                   #IMPLIED
    justify         (%simple.justifys;)
                                   #IMPLIED
    open            %pixpct;       #IMPLIED
    bgcolor         %color;        #IMPLIED
    >

<!-- ******************************************************* -->
<!-- * View Entries                                        * -->
<!-- ******************************************************* -->

<!--
This is the output of the ?ReadViewEntries URL. All of the requested entries
are output as a list of <viewentry> elements in a <viewentries> element.
The nesting implied by categories and response hierarchies is flattened out.
-->

<!ELEMENT viewentries ( viewentry* )>

<!-- Attributes for <viewentries>:
    toplevelentries:
                    The number of top-level entries in the entire view.
-->
<!ATTLIST viewentries
    %root.attrs;
    toplevelentries %integer;      #IMPLIED
    >

<!-- Each line in the view becomes an <viewentry> element. -->

<!ELEMENT viewentry ( entrydata* )>
<!ATTLIST viewentry
    position        CDATA          #IMPLIED
    unid            %unid;         #IMPLIED
    noteid          %noteid;       #IMPLIED
    children        %integer;      #IMPLIED
    siblings        %integer;      #IMPLIED
    descendants     %integer;      #IMPLIED
    collapsed       %boolean;      #IMPLIED
    response        %boolean;      #IMPLIED
    conflict        %boolean;      #IMPLIED
    categorytotal   %boolean;      #IMPLIED
    markedfordel    %boolean;      #IMPLIED
    unread          %boolean;      #IMPLIED
    unreadchildren  %boolean;      #IMPLIED
    relevance       %integer;      #IMPLIED
    >

<!ELEMENT entrydata ( %simple.types; )>

<!-- Attributes for <entrydata>:
    category:       Is this entry data the name of a category?
-->
<!ATTLIST entrydata
    columnnumber    %integer;      #IMPLIED
    indent          %integer;      #IMPLIED
    name            %string;       #IMPLIED
    category        %boolean;      #IMPLIED
    >

<!-- end of domino.dtd -->
