<!--  This is the Document Type Definition (DTD) for msaml.             -->
<!--  A DTD for describing multiple sequence alignments.                -->

<!--  This DTD was created by Paul Gordon (Paul.Gordon@nrc.ca)          -->
<!--  Insitute for Marine Biosciences, ©National Research Council Canada-->
<!--  Email the above address for corrections and suggestions.          -->
<!--  This DTD's DISTRIBUTION and USE is UNLIMITED under the condition  -->
<!--  that its entire content remains intact.                           -->

<!--  THIS DTD AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT     -->
<!--  HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,-->
<!--  INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR    -->
<!--  FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE DTD     -->
<!--  OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,       -->
<!--  COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.                           -->

<!--  COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,    -->
<!--  SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE    -->
<!--  DTD OR DOCUMENTATION.                                             -->

<!--  The name and trademarks of the copyright holder may NOT be used in-->
<!--  advertising or publicity pertaining to the DTD without            -->
<!--  specific, written prior permission. Title to copyright in this    -->
<!--  DTD and any associated documentation will at all times remain     -->
<!--  with copyright holders.                                           -->
 
<!--  Version 1.0 (19/NO/1999): Initial revision                        -->
<!--  Version 1.1 (02/FE/2000): Addition of seq element, at attr of gap -->

<!--  NOTE:                                                             -->
<!--  The key words "MUST", "SHOULD" and "MAY" in this document are to  -->
<!--  be interpreted as described in RFC 2119.                          -->

<!ELEMENT MSAML (alignment)*>

<!--  Parameter Entities (Internal)                                     -->
<!ENTITY  % number       "#PCDATA">
<!ENTITY  % string       "#PCDATA">
<!ENTITY  % gapchar      "-">
<!ENTITY  % exact        "*"> <!-- Conservation notation starts -->
<!ENTITY  % strong       ":">
<!ENTITY  % weak         ".">
<!ENTITY  % none         " "> <!-- Conservation notation ends -->
<!ENTITY  % paramnames   "custom">
<!ENTITY  % algnames     "custom">

<!--  General Entities (for use in document) -->
<!ENTITY  g      "%gapchar;">
<!ENTITY  e      "%exact;">
<!ENTITY  s      "%strong;">
<!ENTITY  w      "%weak;">
<!ENTITY  n      "%none;">

<!--  Define the boundaries of a single alignment -->
<!ELEMENT alignment (scoring?,((conservation*,sequence,sequence+)+|
                             (sequence,sequence+,conservation*)+)+,scoring?)>
<!ATTLIST alignment conservation CDATA #IMPLIED
                    algorithm (Smith-Waterman|weighted-average|HMM|consensus-word|%algnames;) #IMPLIED>

<!ELEMENT sequence (%string;?,seqname?,%string;?,seq,%string;?)>
<!ATTLIST sequence seqname CDATA #IMPLIED>

<!ELEMENT seqname (%string;)>
<!ATTLIST seqname value CDATA #IMPLIED>

<!ELEMENT seq (%string;|gap)+>
<!ATTLIST seq value CDATA #IMPLIED>

<!ELEMENT conservation (%string;|gap)+>
<!ATTLIST conservation value CDATA #IMPLIED>

<!ELEMENT gap (%string;)>
<!ATTLIST gap length CDATA #IMPLIED
              at CDATA #IMPLIED>

<!ELEMENT scoring (param)*>

<!ELEMENT param (%string;?,pname,%string;?,pvalue,%string;?)?>
<!ATTLIST param pname (GapCreationPenalty|GapExtensionPenalty|%paramnames;) #IMPLIED
                pvalue CDATA #IMPLIED>

<!ELEMENT pname (%string;)>
<!ELEMENT pvalue (%string;)>
