Re: (dsssl) simple loop question

Subject: Re: (dsssl) simple loop question
From: tmcd@xxxxxxxxx
Date: Thu, 10 Apr 2003 16:18:09 -0400 (EDT)
Ian Zimmerman <itz@xxxxxxxxxxxxx> wrote:
> (define wrap-with-mi (lambda (#!optional (nl (children (current-node))))
>         (map (lambda (n) (if (equal? 'data-char (node-property 'class-name n))
>                              (make element gi: "mi"
>                              (literal (string (node-property 'char n))))))
>              nl)))
>                          (process-node-list cn)

That's an "if" with no "else" part -- I don't know if that's
significant, or what happens if you do that.  Other parens are screwed
up, I think (is that last line a hanger-on leftover after editing?).

>> The following function should proceses current (or given) node
>> list, wrap character data with <mi>element and process other
>> elements.

So there is a way to get character data?  I was wondering how to
distinguish the input
    <ltt-name></ltt-name>
from
    <ltt-name>A name goes here</ltt-name>
and, if so, how to extract "A name goes here" as a string usable in
DSSSL.  If "n" is the ltt-name node, then, I can do
    (string (node-property 'char n))
to get the character data, and
    (equal? 'data-char (node-property 'class-name n))
to find out if it has character data?  Or are the characters attached
to child nodes of n?  How can entities be handled, as in
    <ltt-name>Fran&#231;ois</ltt-name>
?

If I get the string values, I would like to sort nodes based on their
<ltt-name> value.  I see a general sorter (quicksort-maker) at
<http://www.dpawson.co.uk/docbook/dsssl/dssslgeneral.html#d1579e906>,
an FAQ-like document.

-- 
Tim McDaniel, tmcd@xxxxxxxxx; tmcd@xxxxxxxxxx is my work address

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

Current Thread