move defstructs around, patch by Raymond Wiker
authorDavid Lichteblau <david@lichteblau.com>
Sun, 18 Oct 2009 09:13:25 +0000 (18 11:13 +0200)
committerDavid Lichteblau <david@radon.(none)>
Sun, 18 Oct 2009 09:13:25 +0000 (18 11:13 +0200)
unparse.lisp
xslt.lisp

index f36acb1..b572245 100644 (file)
     (sax:unparsed-internal-subset *sink* internal-subset))
   (sax:end-dtd *sink*))
 
+(defstruct sink-element
+  local-name
+  uri
+  suggested-prefix
+  all-namespaces
+  new-namespaces
+  used-prefixes
+  attributes
+  actual-qname)
+
+(defstruct sink-attribute
+  local-name
+  uri
+  suggested-prefix
+  value)
+
 (defun maybe-emit-start-tag ()
   (let ((elt *current-element*))
     (when (and elt (not *start-tag-written-p*))
               (concatenate 'string "xmlns:" prefix))
    :value uri))
 
-(defstruct sink-element
-  local-name
-  uri
-  suggested-prefix
-  all-namespaces
-  new-namespaces
-  used-prefixes
-  attributes
-  actual-qname)
-
-(defstruct sink-attribute
-  local-name
-  uri
-  suggested-prefix
-  value)
-
 (defparameter *initial-unparse-namespaces*
   '(("" . "")
     ("xmlns" . #"http://www.w3.org/2000/xmlns/")
index 7baff23..28b8ed2 100644 (file)
--- a/xslt.lisp
+++ b/xslt.lisp
                   (funcall (variable-value-thunk-setter var))))
               chains)))))
 
+
+(defstruct template
+  match-expression
+  compiled-pattern
+  name
+  import-priority
+  apply-imports-limit
+  priority
+  position
+  mode
+  mode-qname
+  params
+  body
+  n-variables
+  ;; for profiling output only:
+  unparsed-qname
+  stylesheet
+  base-uri)
+
 (defun parse-templates! (stylesheet <transform> env)
   (let ((i 0))
     (do-toplevel (<template> "template" <transform>)
           (t
            (make-auto-detect-sink (make-combi-sink) method-key)))))))
 
-(defstruct template
-  match-expression
-  compiled-pattern
-  name
-  import-priority
-  apply-imports-limit
-  priority
-  position
-  mode
-  mode-qname
-  params
-  body
-  n-variables
-  ;; for profiling output only:
-  unparsed-qname
-  stylesheet
-  base-uri)
-
 (defun expression-priority (form)
   (let ((step (second form)))
     (if (and (null (cddr form))