ovidiu 01/12/16 22:59:18 Modified: scratchpad/schecoon/scheme test.scm Log: Take into consideration the first argument passed to a matcher function, which is the full URL that matched. Revision Changes Path 1.4 +15 -14 xml-cocoon2/scratchpad/schecoon/scheme/test.scm Index: test.scm =================================================================== RCS file: /home/cvs/xml-cocoon2/scratchpad/schecoon/scheme/test.scm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- test.scm 2001/12/14 20:39:55 1.3 +++ test.scm 2001/12/17 06:59:18 1.4 @@ -1,10 +1,6 @@ (load-module "sisc.modules.J2S") -(define (main url request response) - (the-sitemap url) -) - -;;; sample example of a sitemap +;;; sample sitemap with the associated pipeline definitions (define pipelines (define-pipelines (define-pipeline docbook-xhtml @@ -24,24 +20,29 @@ (define the-sitemap (define-sitemap (match "sql/(.*)" - (lambda (file . args) + (lambda (dummy file . args) (write (list 'call-pipeline 'docbook-xhtml file)))) (match "slides/(.*)\.gif" - (lambda (file . args) + (lambda (dummy file . args) (write '(call-pipeline gif-image file)))) - (match "view-source/*" - (lambda (file . args) + (match "view-source/(.*)" + (lambda (dummy file . args) (write '(generate file)) (newline) (write '(transform '((type xslt) (name "xsp")))) (newline) (write '(serialize (type xml))) (newline))) - (match "shopping-cart" - (shopping-cart)) + (match "shopping-cart/(.*)" + (lambda (dummy file . args) + (shopping-cart file))) )) -(define (shopping-cart) -; (display "shopping cart invoked") (newline) - #f +(define shopping-cart + (lambda (file) +; (display "shopping cart invoked") (newline) + #f)) + +(define (main url request response) + (the-sitemap url) )
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]