s/xpath/xpattern/
authorDavid Lichteblau <david@lichteblau.com>
Sun, 27 Apr 2008 16:25:35 +0000 (27 18:25 +0200)
committerDavid Lichteblau <david@radon.(none)>
Sun, 27 Apr 2008 16:25:35 +0000 (27 18:25 +0200)
TEST
number.lisp
space.lisp
xslt.lisp

diff --git a/TEST b/TEST
index e575e53..62568a9 100644 (file)
--- a/TEST
+++ b/TEST
@@ -1,3 +1,19 @@
+; in:
+;      LAMBDA (#:G2922 #:G2923 #:G2924 #:G2925 #:G2926 #:G2927 #:G2928 #:G2929
+;          #:G2933 #:G2934)
+;     (TYPEP SB-PCL::.ARG0. 'RUNES::OCTET-VECTOR-YSTREAM)
+; --> SB-C::%INSTANCE-TYPEP 
+; ==>
+;   SB-PCL::.ARG0.
+; 
+; note: deleting unreachable code
+
+;     (IF (TYPEP SB-PCL::.ARG0. 'RUNES::OCTET-VECTOR-YSTREAM) #:G2922 #:G2923)
+; 
+; note: deleting unreachable code
+; 
+; compilation unit finished
+;   printed 2 notes
 PASS attribset_attribset01 [XSLT-Result-Tree]
   Stylesheet: Xalan_Conformance_Tests/attribset/attribset01.noindent-xsl
   Data: Xalan_Conformance_Tests/attribset/attribset01.xml
index cde5fdc..074ed47 100644 (file)
@@ -44,9 +44,9 @@
                             grouping-separator grouping-size)
       args
     (let ((count (and count (without-xslt-current ()
-                              (xpath:make-pattern-matcher* count env))))
+                              (xpattern:make-pattern-matcher* count env))))
           (from  (and from (without-xslt-current ()
-                             (xpath:make-pattern-matcher* from env))))
+                             (xpattern:make-pattern-matcher* from env))))
           (value (and value (compile-xpath value env)))
           (format       (compile-avt (or format "1") env))
           (lang         (compile-avt (or lang "") env))
@@ -82,7 +82,7 @@
                 grouping-size))))))))
 
 (defun pattern-thunk-matches-p (pattern-thunk node)
-  (xpath:matching-value pattern-thunk node))
+  (xpattern:matching-value pattern-thunk node))
 
 (defun ancestors-using-count-and-from (node count from)
   (let ((ancestors
index 2ecfdc2..1972b88 100644 (file)
 (defun strip-under-qname-p (node strip-thunk)
   (let* ((strip-test
           (maximize #'strip-test-<
-                    (xpath:matching-values strip-thunk node))))
+                    (xpattern:matching-values strip-thunk node))))
     (and strip-test
          (eq (strip-test-value strip-test) :strip))))
 
index ae8b3ff..b2f1932 100644 (file)
--- a/xslt.lisp
+++ b/xslt.lisp
     (let ((*namespaces* *initial-namespaces*))
       (xpath:do-node-set (ancestor (xpath:evaluate "ancestor::node()" node))
         (xpath:with-namespaces (("" #.*xsl*))
-          (when (xpath:node-matches-p ancestor "stylesheet|transform")
+          (when (xpattern:node-matches-p ancestor "stylesheet|transform")
             ;; discard namespaces from including stylesheets
             (setf *namespaces* *initial-namespaces*)))
         (when (xpath-protocol:node-type-p ancestor :element)
   (with-resignalled-errors ()
     (xpath:with-namespaces ((nil #.*xsl*))
       (let* ((*import-priority* 0)
-             (xpath:*allow-variables-in-patterns* nil)
+             (xpattern:*allow-variables-in-patterns* nil)
              (puri:*strict-parse* nil)
              (stylesheet (make-stylesheet))
              (*stylesheet*
            for mode being each hash-value in (stylesheet-modes stylesheet)
            do
              (setf (mode-match-thunk mode)
-                   (xpath:make-pattern-matcher
+                   (xpattern:make-pattern-matcher
                     (mapcar #'template-compiled-pattern
                             (mode-templates mode)))))
         ;; and for the strip tests
         (setf (stylesheet-strip-thunk stylesheet)
               (let ((patterns (stylesheet-strip-tests stylesheet)))
                 (and patterns
-                     (xpath:make-pattern-matcher
+                     (xpattern:make-pattern-matcher
                       (mapcar #'strip-test-compiled-pattern patterns)))))
         stylesheet))))
 
      :patterns
      (mapcar (lambda (name-test)
                (destructuring-bind (&optional path &rest junk)
-                   (cdr (xpath:parse-pattern-expression name-test))
+                   (cdr (xpattern:parse-pattern-expression name-test))
                  (check-null junk)
                  (check (eq (car path) :path))
                  (destructuring-bind (&optional child &rest junk) (cdr path)
                         (stp:attribute-value elt "elements"))))
           (let* ((compiled-pattern
                   (car (without-xslt-current ()
-                         (xpath:compute-patterns
+                         (xpattern:compute-patterns
                           `(:patterns ,expression)
                           *import-priority*
                           "will set below"
                                    :priority (expression-priority expression)
                                    :position i
                                    :value value)))
-            (setf (xpath:pattern-value compiled-pattern) strip-test)
+            (setf (xpattern:pattern-value compiled-pattern) strip-test)
             (push strip-test (stylesheet-strip-tests stylesheet)))))
       (incf i))))
 
         (when cdata-section-elements
           (dolist (qname (words cdata-section-elements))
             (decode-qname qname env nil) ;check the syntax
-            (push (xpath:make-pattern-matcher* qname env)
+            (push (xpattern:make-pattern-matcher* qname env)
                   (output-cdata-section-matchers spec))))
         (when standalone
           (setf (output-standalone-p spec)
 
 (defun find-templates (ctx mode)
   (let* ((matching-candidates
-          (xpath:matching-values (mode-match-thunk mode)
-                                 (xpath:context-node ctx)))
+          (xpattern:matching-values (mode-match-thunk mode)
+                                    (xpath:context-node ctx)))
          (npriorities
           (if matching-candidates
               (1+ (reduce #'max
                      (let* ((compiled-pattern
                              (xslt-trace-thunk
                               (car (without-xslt-current ()
-                                     (xpath:compute-patterns
+                                     (xpattern:compute-patterns
                                       `(:patterns ,expression)
                                       42
                                       :dummy
                                             :params param-bindings
                                             :body outer-body-thunk
                                             :n-variables n-variables)))
-                       (setf (xpath:pattern-value compiled-pattern)
+                       (setf (xpattern:pattern-value compiled-pattern)
                              template)
                        template))
-                   (cdr (xpath:parse-pattern-expression match)))))))))
+                   (cdr (xpattern:parse-pattern-expression match)))))))))
 #+(or)
 (xuriella::parse-stylesheet #p"/home/david/src/lisp/xuriella/test.xsl")