node-list question 2

Subject: node-list question 2
From: Bas Peters <bpeters@xxxxxx>
Date: Tue, 4 May 1999 10:00:05 +0200
(strip-trailing-punctuation (data isbn)) seems to work, I have the idea
that the values run through the strip trailing function, but the
stripped values are not returned to the node list. Does any one have any
suggestions? Here's the code:

(define (strip-trailing-punctuation s)
  (let ((ls-2 (- (string-length s) 2)))
      (case (string-ref s ls-2)
	((#\space #\; #\space #\:) (substring s 0 ls-2))
	(else s))))

(mode isbn
  (element MRCB020-a
    (make paragraph
      space-before: 2pt
      (literal "ISBN ")
      (process-children))))

(element MRCB
  (let ((isbn (select-elements (descendants (current-node))
                               "MRCB020-a")))   
  (if (not (node-list-empty? isbn))
    (strip-trailing-punctuation (data isbn)) 
    (data isbn))
  (make paragraph
      space-after: 10pt
      keep: #t
  (sosofo-append (process-children)
    (if (not (node-list-empty? isbn))
      (with-mode isbn
        (process-node-list isbn))
      (empty-sosofo))))))

regards,

Bas Peters
bpeters@xxxxxx

> -----Original Message-----
> From:	Joerg Wittenberger [SMTP:Joerg.Wittenberger@xxxxxxxxx]
> Sent:	Monday, May 03, 1999 7:42 PM
> To:	dssslist@xxxxxxxxxxxxxxxx
> Subject:	Re: node-list question
> 
> >>>>> "BP" == Bas Peters <bpeters@xxxxxx> writes:
> 
> BP> ; call function strip trailing punctuation
> BP>     (strip-trailing-punctuation isbn)   
> 
> I think this should read:
> 
>         (strip-trailing-punctuation (data isbn))
> 
> /Jerry
> 
> 
>  DSSSList info and archive:
> http://www.mulberrytech.com/dsssl/dssslist


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread