anchor.diff:      )
   
   
  +#| Some experimenting indicates that, at least for queries
  +where ((action query) (prop revisions) (rvprop content)), the
  +parameters titles and revids are mutually exclusive. 
  +
  +The following implementation is therefore broken. By requiring titles,
  +it prevents you from doing queries that specified a particular
  +revision id, for instance. |#
  +
   (define-proxy get-page-content
       :core ((action query)
   	   (prop revisions)
  
positive.code: 	    rvexcludeuser rvcontinue)
      :processor
      (lambda (sxml)
        (let ((revs (mapcar #'(lambda (n) (convert-sxml-attribs-to-alist (second n)))
  			  (find-nodes-by-name "rev" sxml)))
  	    (c-blob (first (find-nodes-by-name "query-continue" sxml))))
  	(values revs (when c-blob
  		       (destructuring-bind (_1 _2 (_3 ((_4 continuation)))) c-blob
  			   (declare (ignore _1 _2 _3 _4))
  			   continuation)))))
      :doc
      "Gets the revisions of a page.
  
  Parameters:
    titles         - the title of the page we wish to retrieve the info of
    rvprop:        - Which properties to get for each revision
                     Values (separate with '|'): ids, flags, timestamp, user, comment, size.
  		   Default is all. Unsupported values: content, tags.
    rvcontinue: -    When more results are available, use this to continue
                     (This is different from the returned continuation.)
    rvlimit: 	 - The maximum number of revisions to return (enum)
  
negative.code:                    (a number indicating which section, not the section name)
  
   Examples: (get-page-content \"Physics\")
  
   Returns: a string with the given page content
  ")
  
  (define-proxy get-page-content-by-revid
      :core ((action query)
  	   (prop revisions)
  	   (rvprop content))
    :req (revids)
    :props (rvsection)
    :processor
    (lambda (sxml)
      (let ((rows (find-nodes-by-name "rev" sxml)))
        (third (first rows))))
    :doc
      "Get the content for a given revid
  
  Parameters:
    revids - the revision id of the page
  
    rvsection      - only retrieve the content of this section
                     (a number indicating which section, not the section name)
  
   Examples: (get-page-content 446445813)
  
   Returns: a string with the given page content
  ")
  