[XML-SIG] Proposed XBEL DTD

Fred L. Drake Fred L. Drake, Jr." <fdrake@acm.org
Thu, 1 Oct 1998 12:33:08 -0400 (EDT)


--rUOjWGCBJo
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit


  I've attached what I now have as the XBEL DTD.  Since the last post, 
I've removed the "id" and "lang" attributes from <metadata>.  "id" was 
removed because it was the only thing that had an ID that should not
be referred to by an alias.  "lang" was removed because XML supports
the "xml:lang" attribute for this purpose.  Note the xml:lang still
has to be declared to be valid, but I expect use of it for this
application will be limited at best, so I've left it out for now.
  In addition, I've added two new parameter entities, common.attrs and
node.attrs.  common.attrs is included in the attribute list for all
elements other than <xbel>, and is defined to be empty.  node.attrs is 
only used on the <folder> and <url> elements, since those are the
essential location for attributes relating to the nodes of the
bookmark tree (<bookmark> still uses <url> to carry the attributes, so 
this is not needed on <bookmark>).  I used this to defined the "id"
and "added" attributes since those are shared.


  -Fred

--
Fred L. Drake, Jr.	     <fdrake@acm.org>
Corporation for National Research Initiatives
1895 Preston White Dr.	    Reston, VA  20191



--rUOjWGCBJo
Content-Type: text/xml
Content-Description: Proposed XBEL DTD
Content-Disposition: inline;
	filename="xbel.dtd"
Content-Transfer-Encoding: 7bit

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

	-//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN

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

	http://www.python.org/topics/xml/dtds/xbel-1.0.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
  -->

<!ENTITY % common.attrs	"">
<!ENTITY % node.attrs	"id	ID	#IMPLIED
			 added	CDATA	#IMPLIED">
<!ENTITY % nodes	"bookmark|folder|url|alias|separator">

<!ELEMENT xbel (title?, info?, desc?, (%nodes;)*)>
<!ATTLIST xbel
            version  CDATA	#FIXED "1.0"
>
<!ELEMENT title	     (#PCDATA)>
<!ATTLIST title
	    %common.attrs;
>

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

<!ELEMENT info (metadata*)>
<!ATTLIST info
	    %common.attrs;
>

<!ELEMENT metadata (meta*)>
<!ATTLIST metadata
	    %common.attrs;
	    scheme   CDATA	#IMPLIED
>
<!ELEMENT meta (#PCDATA)>
<!ATTLIST meta
	    %common.attrs;
	    name     CDATA	#REQUIRED
>

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

<!ELEMENT folder   (title?,info?,desc?,(%nodes;)*)>
<!ATTLIST folder
	    %common.attrs;
            %node.attrs;
            folded   (yes|no)	'yes'   
>

<!--=================== URL ======================================-->

<!ELEMENT url        (#PCDATA)>
<!ATTLIST url
	    %common.attrs;
	    %node.attrs;
            href     CDATA	#REQUIRED
            visited  CDATA	#IMPLIED
            modified CDATA	#IMPLIED
>

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

<!-- a wrapper around an url when it has to contain extra info
     like a description and info blocks
  -->

<!ELEMENT bookmark (url, info?, desc?)>
<!ATTLIST bookmark
	    %common.attrs;
>

<!ELEMENT desc       (#PCDATA)>
<!ATTLIST desc
	    %common.attrs;
>

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

<!ELEMENT separator EMPTY>
<!ATTLIST separator
	    %common.attrs;
>

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

<!ELEMENT alias EMPTY>
<!ATTLIST alias
	    %common.attrs;
            ref       IDREF	#REQUIRED
>

<!--=================== General Entities ==========================-->

<!-- Entities which must be supported by default by processors, but -->
<!-- which must be declared to be valid:			    -->
<!ENTITY lt "&#38;#60;">
<!ENTITY gt "&#62;">
<!ENTITY amp "&#38;#38;">
<!ENTITY apos "&#39;">
<!ENTITY quot "&#34;">

--rUOjWGCBJo--