/xmlbench/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/xmlbench/trunk

« back to all changes in this revision

Viewing changes to parse/lisp/libxml.cl

  • Committer: Suren A. Chilingaryan
  • Date: 2009-10-02 01:45:17 UTC
  • Revision ID: csa@dside.dyndns.org-20091002014517-2eojbiq34vgh821f
Minor lisp optimizations

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    
39
39
(defmacro get_text_value (node)
40
40
    `(if (and (xtree:first-child ,node) (eq :XML-TEXT-NODE (xtree:node-type (xtree:first-child ,node))))
41
 
            (if (numberp (read_text_value ,node)) (read_text_value ,node) nil) nil))
 
41
        (let ((myval (read_text_value ,node))) 
 
42
            (if (numberp myval) myval nil)) nil))
 
43
;           (if (numberp (read_text_value ,node)) (read_text_value ,node) nil) nil))
42
44
 
43
45
 
44
46
(defmacro get_attr_value (anode)
54
56
    ))
55
57
    
56
58
(defmacro get_value (node) "Read the node value"
57
 
    `(if (get_text_value ,node) (get_text_value ,node) (get_attrs_value ,node)))
 
59
    `(let ((text_val (get_text_value ,node)))
 
60
        (if text_val text_val (get_attrs_value ,node))))
 
61
;    `(if (get_text_value ,node) (get_text_value ,node) (get_attrs_value ,node)))
58
62
 
59
63
 
60
64
(defun parse_file (fn)
79
83
(defvar iterations NIL)
80
84
(defvar xmlfn NIL)
81
85
 
 
86
;sbcl
 
87
;(setf *ARGS* *posix-argv*)
 
88
 
82
89
(if (> (length *ARGS*) 0)
83
90
    (setf iterations (parse-integer (first *ARGS*)))
84
91
    (setf iterations 0))