|
Subject: Re: (data..), (attribute-string...), (node-property...) From: Daniel Speck <dspeck@xxxxxxx> Date: Thu, 20 Aug 1998 10:51:01 -0400 |
John Sidlo wrote:
> In Jade I am trying to extract the data from a nodelist representing:
>
> <title>foo<footnote>bar</footnote>more foo</title>
>
> The dsssl expression (data nl) returns (correctly) "foobarmore foo"; I want
> to extract "foomore foo". I've tried (attribute-string "data" nl) and
> (node-property 'data nl), but the property "data" doesn't seem to be
> defined.
>
> Can someone suggest a way to remove the children from <title>, or otherwise
> extract this?
>
How about something like:
(element (title)
(let* ((title-kids (children (current-node)))
(title-str (data (node-list-filter title-kids
(lambda (node)
(equal?
(node-property 'class-name node)
'data-char)))))
)
(make paragraph
(process-children))))
title-str will be bound to a string that contains just the data characters that
are children of the <title> element. You'll need to define node-list-filter
which can be found in the DSSSL standard.
-dan
> John Sidlo
> Modern Age Books
>
> DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| (data..), (attribute-string...), (n, John Sidlo | Thread | Re: (data..), (attribute-string...), Toby Speight |
| ANNOUNCE: Modular DocBook Styleshee, Norman Walsh | Date | I need information about SGML to HT, miguel . mata |
| Month |