Changeset 15360 in project


Ignore:
Timestamp:
08/07/09 14:53:07 (10 years ago)
Author:
sjamaan
Message:

Update to use latest sxml-fu version

Location:
release/4/qwiki/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/4/qwiki/trunk/qwiki-sxml.scm

    r15352 r15360  
    4141(import chicken scheme)
    4242
    43 (use sxpath-lolevel sxml-transforms doctype)
     43(use sxpath-lolevel sxml-transforms doctype uri-generic)
    4444
    4545(define qwiki-basic-transformation-rules
    46   `((wiki-page *macro* . ,(lambda page
    47                             `((xhtml-1.0-strict)
    48                               (html
    49                                (head
    50                                 (title ,(or (sxml:attr 'title page)
    51                                             "qwiki")))
    52                                (body ,@(sxml:content-raw page))))))))
     46  `((wiki-page
     47     *macro* . ,(lambda page
     48                  `((xhtml-1.0-strict)
     49                    (html
     50                     (head
     51                      (title ,(or (sxml:attr 'title page) "qwiki")))
     52                     (body
     53                      (page-specific-links)
     54                      ,@(sxml:content-raw page))))))
     55    (page-specific-links
     56     *macro* . ,(lambda _
     57                  `(ul (@ (class "page-specific-links"))
     58                       (li (url "?action=show" "show"))
     59                       (li (url "?action=edit" "edit"))
     60                       (li (url "?action=history" "history")))))
     61    ,@alist-conv-rules))
    5362
    5463)
  • release/4/qwiki/trunk/qwiki.meta

    r15351 r15360  
    11((synopsis "qwiki - the quick wiki")
    2  (needs wiki-parse intarweb uri-common spiffy (doctype 1.2) sxml-transforms)
     2 (needs wiki-parse intarweb uri-common spiffy (doctype 1.2) sxml-transforms
     3        (sxml-fu 0.2))
    34 (author "Peter Bex")
    45 (category www)
  • release/4/qwiki/trunk/qwiki.scm

    r15352 r15360  
    3636(module qwiki
    3737  (qwiki-docroot qwiki-repos-uri qwiki-repos-username qwiki-repos-password
    38    qwiki-source-path qwiki-base-uri
     38   qwiki-source-path qwiki-base-uri qwiki-transformation-steps
    3939   qwiki-handler qwiki-show qwiki-edit qwiki-history)
    4040
     
    4242(use extras files ports posix data-structures srfi-1 srfi-13
    4343     intarweb uri-common spiffy sxml-transforms svn-client
    44      wiki-parse qwiki-sxml)
     44     wiki-parse qwiki-sxml doctype sxml-fu sxml-shortcuts)
    4545
    4646;; HTML files are stored here, relative to the current Spiffy docroot
     
    6060
    6161;; The rules used for transforming page SXML structure into HTML
    62 (define qwiki-transformation-rules
     62(define qwiki-transformation-steps
    6363  (make-parameter
    64    (append qwiki-basic-transformation-rules
    65            doctype-rules
    66            universal-conversion-rules)))
     64   (list qwiki-basic-transformation-rules
     65         shortcut-rules
     66         (append doctype-rules universal-conversion-rules))))
    6767
    6868;; Return the trailing part of the path relative to the docroot/base-uri
     
    132132          (with-output-to-port (response-port (current-response))
    133133            (lambda ()
    134              (SRV:send-reply
    135               (pre-post-order content (qwiki-transformation-rules)))))))))
     134              (output-xml content (qwiki-transformation-steps))))))))
    136135
    137136(define (redirect-to-qwiki-page req
     
    172171        (let ((content `(wiki-page
    173172                         ,(call-with-input-file source-file wiki-parse))))
    174           (SRV:send-reply
    175            (pre-post-order content (qwiki-transformation-rules))))))))
     173          (output-xml content (qwiki-transformation-steps)))))))
    176174
    177175;;; Request dispatching
Note: See TracChangeset for help on using the changeset viewer.