diff -ru html-template-0.1.2/doc/index.html html-template-new/doc/index.html --- html-template-0.1.2/doc/index.html 2004-09-16 21:51:40.000000000 +0100 +++ html-template-new/doc/index.html 2004-09-16 23:29:22.000000000 +0100 @@ -85,6 +85,13 @@
  • delete-from-template-cache
  • *template-start-marker*
  • *template-end-marker* +
  • *template-var-token* +
  • *template-if-start-token* +
  • *template-else-token* +
  • *template-if-end-token* +
  • *template-loop-start-token* +
  • *template-loop-end-token* +
  • *template-include-token*
  • *default-template-pathname*
  • *default-template-output*
  • *convert-nil-to-empty-string* @@ -721,6 +728,55 @@


    [Special variable] +
    *template-var-token* + +


    +This should be a string (the default is TMPL_VAR) which is used at generation time to determine the occurrence of a VAR tag. +
    + +


    [Special variable] +
    *template-if-start-token* + +


    +This should be a string (the default is TMPL_IF) which is used at generation time to determine the occurrence of a IF tag. +
    + +


    [Special variable] +
    *template-else-token* + +


    +This should be a string (the default is TMPL_ELSE) which is used at generation time to determine the occurrence of a ELSE tag. +
    + +


    [Special variable] +
    *template-if-end-token* + +


    +This should be a string (the default is /TMPL_IF) which is used at generation time to determine the occurrence of a closing IF tag. +
    + +


    [Special variable] +
    *template-loop-start-token* + +


    +This should be a string (the default is LOOP) which is used at generation time to determine the occurrence of a LOOP tag. +
    + +


    [Special variable] +
    *template-loop-end-token* + +


    +This should be a string (the default is /LOOP) which is used at generation time to determine the occurrence of a closing LOOP tag. +
    + +


    [Special variable] +
    *template-include-token* + +


    +This should be a string (the default is INCLUDE) which is used at generation time to determine the occurrence of a INCLUDE tag. +
    + +


    [Special variable]
    *default-template-pathname*


    diff -ru html-template-0.1.2/packages.lisp html-template-new/packages.lisp --- html-template-0.1.2/packages.lisp 2004-09-16 21:48:35.000000000 +0100 +++ html-template-new/packages.lisp 2004-09-16 23:24:51.000000000 +0100 @@ -39,6 +39,13 @@ #:clear-template-cache #:*template-start-marker* #:*template-end-marker* + #:*template-var-token* + #:*template-if-start-token* + #:*template-else-token* + #:*template-if-end-token* + #:*template-loop-start-token* + #:*template-loop-end-token* + #:*template-include-token* #:*default-template-pathname* #:*default-template-output* #:*convert-nil-to-empty-string* @@ -69,6 +76,13 @@ "CLEAR-TEMPLATE-CACHE" "*TEMPLATE-START-MARKER*" "*TEMPLATE-END-MARKER*" + "*TEMPLATE-VAR-TOKEN*" + "*TEMPLATE-IF-START-TOKEN*" + "*TEMPLATE-ELSE-TOKEN*" + "*TEMPLATE-IF-END-TOKEN*" + "*TEMPLATE-LOOP-START-TOKEN*" + "*TEMPLATE-LOOP-END-TOKEN*" + "*TEMPLATE-INCLUDE-TOKEN*" "*DEFAULT-TEMPLATE-PATHNAME*" "*DEFAULT-TEMPLATE-OUTPUT*" "*CONVERT-NIL-TO-EMPTY-STRING*" diff -ru html-template-0.1.2/specials.lisp html-template-new/specials.lisp --- html-template-0.1.2/specials.lisp 2004-09-16 21:48:43.000000000 +0100 +++ html-template-new/specials.lisp 2004-09-16 23:25:45.000000000 +0100 @@ -37,6 +37,27 @@ (defvar *template-end-marker* "-->" "The string template tags must end with") +(defvar *template-var-token* "TMPL_VAR" + "The string for the VAR tag") + +(defvar *template-if-start-token* "TMPL_IF" + "The string for the IF tag") + +(defvar *template-else-token* "TMPL_ELSE" + "The string for the ELSE tag") + +(defvar *template-if-end-token* "/TMPL_IF" + "The string for the closing IF tag") + +(defvar *template-loop-start-token* "TMPL_LOOP" + "The string for the LOOP tag") + +(defvar *template-loop-end-token* "/TMPL_LOOP" + "The string for the closing LOOP tag") + +(defvar *template-include-token* "TMPL_INCLUDE" + "The string for the INCLUDE tag") + (defvar *printer-hash* (make-hash-table :test #'equal) "The cache for template printers. Each entry is of the form (PRINTER . WRITE-DATE).") diff -ru html-template-0.1.2/template.lisp html-template-new/template.lisp --- html-template-0.1.2/template.lisp 2004-09-16 21:48:52.000000000 +0100 +++ html-template-new/template.lisp 2004-09-16 23:27:22.000000000 +0100 @@ -179,7 +179,7 @@ (signal-template-syntax-error "EOF while inside of tag starting with ~S" *template-start-marker*)))))) - (cond ((string-equal token "TMPL_INCLUDE") + (cond ((string-equal token *template-include-token*) ;; TMPL_INCLUDE tag - first read the pathname which has to ;; follow and merge it with *DEFAULT-TEMPLATE-PATHNAME* (let* ((pathname (read-tag-rest :read-attribute t :intern nil)) @@ -209,7 +209,7 @@ merged-pathname next-fn) else-follows)))) - ((string-equal token "TMPL_VAR") + ((string-equal token *template-var-token*) ;; TMPL_VAR tag - first read the symbol which has to ;; follow and intern it (let ((symbol (read-tag-rest :read-attribute t))) @@ -226,7 +226,7 @@ symbol next-fn) else-follows)))) - ((string-equal token "TMPL_LOOP") + ((string-equal token *template-loop-start-token*) ;; TMPL_LOOP tag - first read the symbol which has to ;; follow and intern it (let* ((symbol (read-tag-rest :read-attribute t)) @@ -255,7 +255,7 @@ loop-fn next-fn) else-follows)))) - ((string-equal token "/TMPL_LOOP") + ((string-equal token *template-loop-end-token*) (unless (eq end-token :loop) ;; check if we expected /TMPL_LOOP here, i.e. if an open ;; TMPL_LOOP was pending @@ -268,7 +268,7 @@ ;; this is the end of some TMPL_LOOP body (create-simple-printer (cons (skip-leading-whitespace string) string-stack))) - ((string-equal token "TMPL_IF") + ((string-equal token *template-if-start-token*) ;; TMPL_IF tag - first read the symbol which has to follow ;; and intern it (let ((symbol (read-tag-rest :read-attribute t))) @@ -315,7 +315,7 @@ else-fn next-fn) else-follows)))))) - ((string-equal token "TMPL_ELSE") + ((string-equal token *template-else-token*) (unless (eq end-token :else) ;; check if we expected /TMPL_ELSE here, i.e. if an open ;; TMPL_IF was pending and we haven't seen TMPL_ELSE @@ -333,7 +333,7 @@ ;; return a true second value to denote that we've seen ;; TMPL_ELSE t)) - ((string-equal token "/TMPL_IF") + ((string-equal token *template-if-end-token*) (unless (or (eq end-token :if) (eq end-token :else)) ;; check if we expected /TMPL_IF here, i.e. if an open ;; TMPL_IF was pending