<!--;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-->
<!--                                                                        -->
<!-- Title:         Tree                                                    -->
<!-- Status:        Beta                                                    -->
<!-- Description:   A schema for representing a basic tree.                 -->
<!-- Version:       1.0                                                     -->
<!-- LastModified:  20 February 2009                                        -->
<!-- Author(s):     Christophe Lauret                                       -->
<!--                                                                        -->
<!--;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-->

<!--
  Defines the relationship that the node has with the resource.
   - self:    indicates that  a representation of the node
   - subtree: used to produce a subtree
-->
<!ENTITY  % LINK_REL     "( self | subtree )"                                 >

<!-- The Namespace for the tree                                             -->
<!ENTITY  % TREE_NS       "'http://pageseeder.org/ns/xml/tree'"               >

<!--
  Top level element, a tree.

  @element node A node belonging to that level of the tree.
-->
<!ELEMENT tree                                                     ( node* ) >
<!ATTLIST tree  xmlns              CDATA                           %TREE_NS; >

<!--
  A node to build a tree.

  @element node    The list of child-nodes.
  @element link    The list of links related to this node.

  @attribute id    The identifier for the node (must be unique).
  @attribute name  The name for the node (should be unique). 
  @attribute type  The type of node (
-->
<!ELEMENT node                                              ( node*, link* ) >
<!ATTLIST node         id              ID                          #REQUIRED 
                       name            CDATA                       #REQUIRED 
                       type            NMTOKEN                     #REQUIRED >

<!--
  A link for this node.
  
  @attribute rel  The relationship that this link describes.
  @attribute href The URL pointing the resource.
-->
<!ELEMENT link                                                         EMPTY >
<!ATTLIST link         rel            %LINK_REL;                   #REQUIRED 
                       href           CDATA                        #REQUIRED >

