<!-- $Id: LinkOut.dtd,v 1.1 2003/06/13 00:49:37 dalke Exp $ -->

<!-- LinkOut DTD version 1.1
           
     This document is still under revision and may change.
     
     Changes:
     version 1.1:
     - SubjectType and Attribute lists updated
     - DTD is XML
     version 1.6:
     - <apad> tag added
     
     version sequence refreshed to 1.1 on 2001/09/20
     
     version 1.2:
     - SubObjectSelector updated to 
      
     <!ELEMENT SubObjectSelector       (Database, SubProvider)>
     
     version 1.3:
     - Entities added:  lo.name, lo.genus, lo.species, lo.subsp

     version 1.6:
     - Enitities added: lo.month, lo.authln 
 
    -->

<!-- Typical usage:

        <!DOCTYPE LinkSet PUBLIC "-//NLM//DTD LinkOut//EN" "LinkOut.dtd">
        <LinkSet>
        ...
         </LinkSet>
            
         or:

         <!DOCTYPE Provider PUBLIC "-//NLM//DTD LinkOut//EN" "LinkOut.dtd">
         <Provider>
         ...
         </Provider>

    -->
<!--

   Rule based URL generation. In general, to build the
   URL both base and rule are required, where base is the
   HTTP base address, for example:

       http://www.sciencemag.org/cgi/content/full/

   and rule is in the following format:

       &lo.vol;/&lo.iss;/&lo.page;

   LinkOut will replace the keywords in rule with the actual 
   value for a retrieved citation. Therefore, rule will be 
   translated into: 281/5384/1863
   
   The program will concatenate base with rule:

     http://www.sciencemag.org/cgi/content/full/281/5384/1863

   The following keywords are supported for any database:

     lo.id      - Unique identifier (PMID, GI, TaxID, etc.)

  For PubMed only: 

     lo.pii     - Publisher Item Identification. Must be submitted 
     by the publisher. For example, 6847, in the PubMed DTD this 
     ID is an attribute of the ArticleId element. 

     lo.doi     - Article DOI 

     lo.issn    - Journal ISSN code 

     lo.issnl   - Journal ISSN code without the dash 

     lo.jtit    - Journal title (MEDLINE abbreviation) 

     lo.muid    - MEDLINE Unique Identifier 

     lo.msrc    - MEDLINE source. For example, Exp Brain Res 1998 
     Oct; 122(3):339-350 

     lo.vol     - Volume 

     lo.iss     - Issue 

     lo.page    - First page 

     lo.inum    - Item number for online journals. May be a 
     single letter. 

     lo.year    - Four digit year.  For example, 1998 

     lo.yr      - Last two digit of year.  For example, 98; 00 

     lo.yl      - Last digit of year.  For example, for 1999 use 9;  
     for 1990 use 0 

     lo.month  -  The month. For example, September

     lo.mon     - The 3 letter month abbreviation. For example, Sep 

     lo.mo      - Two digit month.  For example, 01; 12 

     lo.day     - Two digit day. For example, 01; 31 

     lo.otit    - Article title 

     lo.auth    - First author 

     lo.authln  - Last name of the first author


  For Sequence databases (Nucleotide, Protein, Structure, Genome):

     lo.pacc    - Primary accession for sequences
     
  For Taxonomy only:
  
     lo.name    - Full scientific name.  For example: "Homo sapiens neanderthalensis"
     
     lo.genus   - Genius name.  For example: "Homo"
     
     lo.species - Species epithet.  For example: "sapiens"
     
     lo.subsp   - Sub-species epithet.  For example: "neanderthalensis"


-->
<!ENTITY lo.id                   "lo.id">
<!ENTITY lo.pii                  "lo.pii">
<!ENTITY lo.doi                  "lo.doi">
<!ENTITY lo.issn                 "lo.issn">
<!ENTITY lo.issnl                "lo.issnl">
<!ENTITY lo.jtit                 "lo.jtitle">
<!ENTITY lo.muid                 "lo.muid">
<!ENTITY lo.msrc                 "lo.msrc">
<!ENTITY lo.vol                  "lo.vol">
<!ENTITY lo.iss                  "lo.iss">
<!ENTITY lo.page                 "lo.page">
<!ENTITY lo.inum                 "lo.inum">
<!ENTITY lo.year                 "lo.year">
<!ENTITY lo.yr                   "lo.yr">
<!ENTITY lo.yl                   "lo.yl">
<!ENTITY lo.month                "lo.month">
<!ENTITY lo.mon                  "lo.mon">
<!ENTITY lo.mo                   "lo.mo">
<!ENTITY lo.day                  "lo.day">
<!ENTITY lo.otit                 "lo.otit">
<!ENTITY lo.auth                 "lo.auth">
<!ENTITY lo.authln               "lo.authln">
<!ENTITY lo.pacc                 "lo.pacc">
<!ENTITY lo.name                 "lo.name">
<!ENTITY lo.genus                "lo.genus">
<!ENTITY lo.species              "lo.species">
<!ENTITY lo.subsp                "lo.subsp">


<!-- internal DTD entities -->

<!ENTITY % url.data             "#PCDATA">
<!ENTITY % rule.data            "%url.data; | pad | apad | subs | toupper | tolower | strip | normalize">

<!ENTITY % iso.lang.codes       "(DA|DE|EN|EL|ES|FR|IT|IW|JA|NL|NO|RU|SV|ZH)">


<!ELEMENT SubjectType            (#PCDATA)>
<!-- can be one of the following; see LinkOut SubjectTypes and Attributes 
 at http://www.ncbi.nlm.nih.gov/entrez/linkout/doc/subjecttypes.html for a description 
 of these elements: 

//EDUCATION
        conferences/meetings/workshops
        glossaries/dictionaries
        online tutorials/courses

//FUNDING SOURCES
        funding sources

//LITERATURE
        abstracts/indexes/summaries
        aggregators
        books
        individual online article
        images
        libraries
        patent databases
        publishers/providers

//MEDICAL
        clinical trials
        consumer health
        diagnostics
        disease organizations
        medical equipment and devices
        pharmacology
        treatment guidelines

//MOLECULAR BIOLOGY DATABASES
        DNA/protein sequence
        gene/protein/disease-specific
        gene expression
        mapping
        organism-specific
        population/variation
        structure
        taxonomy/phylogenetic

//RESEARCH MATERIALS
        clones/clone libraries
        culture/stock collections
        laboratory equipment
        oligonucleotides
        other reagents

//RESEARCHERS
        colleges/universities
        companies/research institutes
        directories
        individuals
        societies/associations

//TOOLS
        3D structure prediction/functional modeling
        primer design
        protein identification/characterization
        restriction mapping
        sequence screening/similarity/alignment
        sequence viewer
        translation

-->

<!ELEMENT Attribute                 (#PCDATA)>
<!-- can be one of the following; see LinkOut SubjectTypes and Attributes 
 at http://www.ncbi.nlm.nih.gov/entrez/linkout/doc/subjecttypes.html for a description 
 of these elements:
//BARRIERS
        registration required
        subscription/membership/fee required

//OWNERSHIP
        author of URL
        publisher of information in URL

//PUBLICATIONS
        document delivery
        full-text first published
        full-text online
        full-text PDF
        full-text PostScript
        library-local
        summary

-->



<!-- This is the top level element for Provider -->
<!ELEMENT Provider               (ProviderId, Name, NameAbbr, SubjectType*, 
                                    Attribute*, Url*, IconUrl*, Brief?)>
<!ELEMENT ProviderId              (#PCDATA)>
<!ELEMENT Name                    (#PCDATA)>
<!ELEMENT NameAbbr                (#PCDATA)>
<!ELEMENT Url                     (%url.data;)>
<!ATTLIST Url
        LNG               %iso.lang.codes;      "EN"  >
<!ELEMENT IconUrl                 (%url.data;)>
<!ATTLIST IconUrl
        LNG               %iso.lang.codes;      "EN"  >
<!ELEMENT Brief                   (#PCDATA)>
<!-- End of Privider group -->


<!ELEMENT LinkSet                 (Link+)>
<!ELEMENT Link                    (LinkId, ProviderId, IconUrl*,
                                     (ObjectSelector|SubObjectSelector), ObjectUrl+)>
<!ELEMENT LinkId                  (#PCDATA)>
<!ELEMENT ObjectSelector          (Database, ObjectList)>
<!ELEMENT Database                (#PCDATA)>
<!-- The databases available in LinkOut include the following: 
	PubMed, Nucleotide, Protein, Genome, Structure, PopSet, Taxonomy and OMIM -->
    
<!ELEMENT ObjectList              (Query|ObjId)+>
<!ELEMENT Query                   (#PCDATA)>
<!ELEMENT ObjId                   (#PCDATA)>
<!-- End of ObjectList group -->
<!-- End of ObjectSelector group -->

<!-- Libraries must use SubObjectSelector to refer to the sub providers -->
<!ELEMENT SubObjectSelector       (Database, SubProvider)>
<!ELEMENT SubProvider             (NameAbbr, (InclQuery|ExclQuery)*)>
<!ELEMENT InclQuery               (#PCDATA)>
<!ELEMENT ExclQuery               (#PCDATA)>
<!-- End of SubObjectSelector group -->

<!ELEMENT ObjectUrl               (  ((Base, (Rule|RuleToMany)?)
                                     | (Rule|RuleToMany)), UrlName?, 
                                     SubjectType*, Attribute*)>

<!ATTLIST ObjectUrl
        LNG                 %iso.lang.codes;        "EN" >


<!ELEMENT Base                    (%url.data;)>

<!ELEMENT pad                     (%rule.data;)*>
<!-- used to mark up strings that require padding to create fixed-length string
     attributes. --> 

<!ATTLIST pad   
        with                CDATA                   #REQUIRED
        width               CDATA                  #REQUIRED
        align               (left|right)            "right"> 
<!-- with      a character to pad with (required)
     width     result string size (required) (integer)
     align     the text should align to (left|right) (default:right)
     -->
     
<!ELEMENT apad                     (%rule.data;)*>
<!-- used to mark up strings that require padding to create fixed-length string
     attributes. It skips all preceding alpha characters before padding --> 

<!ATTLIST apad   
        with                CDATA                   #REQUIRED
        width               CDATA                  #REQUIRED
        align               (left|right)            "right"> 
<!-- with      a character to pad with (required)
     width     result string size (required) (integer)
     align     the text should align to (left|right) (default:right)
     Examples:
     	<apad with = "0" width = "6">E32</apad>  => "E00032"
     	<apad with = "0" width = "6">640</apad>  => "000640"
     -->

<!ELEMENT subs                 (%rule.data;)*>
<!-- substitute one string for another in the element's content
     -->

<!ATTLIST subs  
        for                 CDATA                   #REQUIRED
        with                CDATA                   #REQUIRED>
<!-- for    the string to replace
     with   the string to substitute
     -->
     
<!ELEMENT toupper              (%rule.data;)*>
<!-- convert element content into upper case -->

<!ELEMENT tolower              (%rule.data;)*>
<!-- convert element content into lower case -->

<!ELEMENT strip                 (%rule.data;)*>
<!-- strip off spaces/letters/digits in the element's content
	-->

<!ATTLIST strip  
	what   (spaces|letters|nondigits|digits)     #REQUIRED>

<!ELEMENT normalize                 (%rule.data;)*>
<!-- are used for normalization of &lo.voll , &lo.iss; elements.
	Examples:
		"Pt 5" 			==> "5"
		"3 Suppl"		==> "3"
		"2A Pt 3"   		==> "2A"
		"10 Suppl 2 Pt 1"   	==> "10"
		"2/3"			==> "2/3"
	-->
	

<!ELEMENT Rule                    (%rule.data;)*>
<!ELEMENT UrlName                 (#PCDATA)>
<!ELEMENT RuleToMany              (Rule, Separator)>
<!ELEMENT Separator               (#PCDATA)>

       
        
<!-- End of ObjectUrl group -->
<!-- End of Link group -->
<!-- End of LinkSet group -->


