Re: breaking a string at record ends

Subject: Re: breaking a string at record ends
From: Jany Quintard <quintard.j@xxxxxx>
Date: Fri, 8 Sep 2000 09:16:32 +0200 (CEST)
On Thu, 7 Sep 2000, Brandon Ibach wrote:

> Quoting Jany Quintard <quintard.j@xxxxxx>:
> > So I process the contents of xmp with a function :
> > (define (output-xmp liste)
> > ...
> >                   (make empty-element gi: "br")
> >                   (literal (string (car chars)))))))))
> > ...
> > The "(literal (string (car chars)))" seems *very* complicated 
> > and I wonder if there is not a better way to do it (using (make character)
> > maybe ?).
> > 
>    Well, yes, you should be able to replace the (literal ...) with
> (make character char: (car chars)).
This was my first try, but it led OJ to crash :-(
I will prepare a simple test-set for the OJ-Team.

> Or, you could take a different
> approach to the whole function and just have it return a modified
> node-list.  So, instead of:
>      (element XMP (output-xmp (string->list (data (current-node)))))
> you'd have:
>      (element XMP (process-node-list (filter-xmp (children (current-node)))))
> ...
>    Of course, this assumes that you've got a <br> element somewhere in
> your source document that we can copy into our output node-list ...
No. It does not. But the code is interesting for learning (I always need
it, you know)

Thanks Brandon.

Jany


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


Current Thread