[bknr-cvs] r1850 - in branches/xml-class-rework/bknr/src: . web

bknr at bknr.net bknr at bknr.net
Sun Feb 19 18:04:49 UTC 2006


Author: hhubner
Date: 2006-02-19 12:04:49 -0600 (Sun, 19 Feb 2006)
New Revision: 1850

Modified:
   branches/xml-class-rework/bknr/src/packages.lisp
   branches/xml-class-rework/bknr/src/web/templates.lisp
Log:
The templater now looks for an environment variable XMLCATALOG to find
the DTD catalog file, in addition to the standard locations.


Modified: branches/xml-class-rework/bknr/src/packages.lisp
===================================================================
--- branches/xml-class-rework/bknr/src/packages.lisp	2006-02-19 17:39:00 UTC (rev 1849)
+++ branches/xml-class-rework/bknr/src/packages.lisp	2006-02-19 18:04:49 UTC (rev 1850)
@@ -256,6 +256,7 @@
 	   #:with-tag-expanders
 
 	   #:*html-variables*
+           #:*template-dtd-catalog*
 
 	   ;; handlers
 	   #:parse-handler-url

Modified: branches/xml-class-rework/bknr/src/web/templates.lisp
===================================================================
--- branches/xml-class-rework/bknr/src/web/templates.lisp	2006-02-19 17:39:00 UTC (rev 1849)
+++ branches/xml-class-rework/bknr/src/web/templates.lisp	2006-02-19 18:04:49 UTC (rev 1850)
@@ -6,6 +6,12 @@
 
 (defvar *template-expander*)
 (defvar *template-env*)
+(defvar *template-dtd-catalog* '(;; libxml standard
+                                 "/etc/xml/catalog"
+                                 ;; FreeBSD
+                                 "/usr/local/share/xml/catalog.ports"
+                                 ;; Find from environment
+                                 (cdr (assoc :xmlcatalog ext:*environment-list*))))
 
 ;; user-error is supposed to be raised when an error is provoced by
 ;; the user (i.e. by supplying invalid form data).
@@ -150,7 +156,7 @@
                      :accessor template-handler-cached-templates)
    (dtd-cache :initform (cxml:make-dtd-cache)
               :reader template-handler-dtd-cache)
-   (catalog :initform (cxml:make-catalog)
+   (catalog :initform (cxml:make-catalog *template-dtd-catalog*)
             :reader template-handler-catalog)))
 
 (defconstant +max-template-expansions-per-request+ 100




More information about the Bknr-cvs mailing list