Created
April 21, 2015 20:17
-
-
Save dcguim/c9079a0a660666a51864 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun insert-pair (key value) | |
(setf (gethash key (gethash current-article *hash*)) value)) | |
(defmethod sax:start-element ((h bibtex-handler) (namespace t) (local-name t) (qname t) (attributes t)) | |
(cond ((equal local-name "ARTIGO-PUBLICADO") | |
(let ((seq (sax:attribute-value (sax:find-attribute "SEQUENCIA-PRODUCAO" attributes)))) | |
(setf (gethash seq *hash*) (make-hash-table)) | |
(format t "seq:~a:~%" seq) | |
(setf current-article seq) | |
(format t "current-article:~a~%" current-article) | |
(insert-pair 'key (concatenate 'string "article-" seq)))) | |
((equal local-name "DADOS-BASICOS-DO-ARTIGO") | |
(let ((tit '('title "TITULO-DO-ARTIGO"))) | |
(let ((e (sax:find-attribute (cadr tit) attributes))) | |
(if e | |
(insert-pair 'title (sax:attribute-value e)))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment