<!-- This is the XML Bookmarks Exchange Language, version 1.1.  It
     should be used with the formal public identifier:

        +//IDN python.org//DTD XML Bookmark Exchange Language 1.1//EN//XML

     One valid system identifier at which this DTD will remain
     available is:

        http://pyxml.sourceforge.net/topics/dtds/xbel-1.1.dtd

     More information the on the DTD, including reference
     documentation, is available at:

        http://www.python.org/topics/xml/xbel/

    Attributes which take date/time values should encode the value
    according to the W3C NOTE on date/time formats:

        http://www.w3.org/TR/NOTE-datetime
  -->


<!-- Customization entities.  Define these before "including" this DTD
     to create "subclassed" DTDs.
  -->
<!ENTITY % local.node.att  "">
<!ENTITY % local.url.att   "">
<!ENTITY % local.nodes.mix "">

<!-- Used to customize the content of the <metadata/> element; derived
     DTDs should define this to be whatever the desired model should
     be.  If not using validation, any well-formed XML will do.
  -->
<!ENTITY % metadata.mix "EMPTY">

<!ENTITY % node.att     "id       ID    #IMPLIED
                         added    CDATA #IMPLIED
                         %local.node.att;">

<!ENTITY % url.att      "href     CDATA #REQUIRED
                         visited  CDATA #IMPLIED
                         modified CDATA #IMPLIED
                         %local.url.att;">

<!ENTITY % nodes.mix    "bookmark|folder|alias|separator
                         %local.nodes.mix;">


<!ELEMENT xbel (title?, info?, desc?, (%nodes.mix;)*)>
<!ATTLIST xbel
            %node.att;
            version  CDATA      #FIXED "1.1"
>
<!ELEMENT title      (#PCDATA)>

<!--=================== Info ======================================-->

<!ELEMENT info (metadata+)>

<!-- Note that "ANY" really means it - this should not be constrained
     to elements defined in this DTD.  Unfortunately, there's no way
     to spell that out in the DTD language.
  -->
<!ELEMENT metadata %metadata.mix;>
<!ATTLIST metadata
            owner    CDATA      #REQUIRED
>

<!--=================== Folder ====================================-->

<!ELEMENT folder   (title?, info?, desc?, (%nodes.mix;)*)>
<!ATTLIST folder
            %node.att;
            folded   (yes|no)   'yes'
            icon     NMTOKEN    #IMPLIED
            toolbar  (yes|no)   'no'
>

<!--=================== Bookmark ==================================-->

<!ELEMENT bookmark (title?, info?, desc?)>
<!ATTLIST bookmark
            %node.att;
            %url.att;
            icon     NMTOKEN    #IMPLIED
>

<!ELEMENT desc       (#PCDATA)>

<!--=================== Separator =================================-->

<!ELEMENT separator EMPTY>

<!--=================== Alias =====================================-->

<!-- <alias> elements correspond to Netscape bookmark aliases.  The
     required "ref" attribute must refer to a <bookmark> or <folder>
     element.  Note that MSIE aliases can refer to folders, so that is
     supported in XBEL.  Applications must be careful about traversing
     aliases to folders to avoid improper recursion through circular
     data structures.
  -->

<!ELEMENT alias EMPTY>
<!ATTLIST alias
            ref       IDREF     #REQUIRED
>
