         delete items["around"]
       items
 
+  # TODO: This should be passed in as part of the tree initialization
+  _makeNodeTitle = (node, title) ->
+    switch title
+      when "ref" then $(node).children('[data-xmlel="label"]').text() || false
+      when "article"
+        $(node).children('[data-xmlel="front"]')
+          .find('[data-xmlel="article-title"]')
+          .map((idx, ele) -> $(ele).text()).get().join(", ")
+      when "title", "article-id" then $(node).text()
+      when "journal-id", "issn", "publisher" then $(node).text()
+      when "sec", "ack", "ref-list" then $(node).children('[data-xmlel="title"]').text()
+      when "p" then $(node).text().substr(0, 20) + "..."
+
+      
   updateTree = (selector, editor) ->
     body = editor.dom.getRoot()
 

      while depth < (holder.length - 1)
        holder.shift()
      title = node.getAttribute('data-xmlel') || ("[" + node.localName + "]")
      holder[0]['children'] ||= []
      holder[0]['state'] ||= 'closed'
      holder[0]['children'].push

        editor.focus()
        previousNode = id

  _depthWalkCallbackGenerator = (holder, nodeTitleCallback) ->
    depthWalkCallback = (depth) ->
      node = this
      if not node.getAttribute?
