Re: (data..), (attribute-string...), (node-property...)

Subject: Re: (data..), (attribute-string...), (node-property...)
From: shennessy@xxxxxxxxxx
Date: Wed, 19 Aug 98 08:41:20 -0800
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?

Try This..

(element (TITLE FOO)
 ( let* (
  ( theTxt (data (current-node )))
   (footnl ($sel-chldrn$ current-node "footnote"))    ;; use
(process-node-list footnl)
);eoletgroup
 (make sequence
  (literal theTxt)
 );eomseq
 );eolet
)

(define ($sel-chldrn$ %this-node% %this-gi%)
 (select-elements (children (%this-node%)) (normalize %this-gi%))
)

Regards,
W. Sean Hennessy






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


Current Thread
  • (data..), (attribute-string...), (node-property...)
    • John Sidlo - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id JAA29553Wed, 19 Aug 1998 09:54:27 -0400 (EDT)
      • Daniel Speck - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA28263Thu, 20 Aug 1998 10:53:38 -0400 (EDT)
      • Toby Speight - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id MAA06334Thu, 20 Aug 1998 12:47:31 -0400 (EDT)
      • <Possible follow-ups>
      • shennessy - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id LAA19018Wed, 19 Aug 1998 11:52:00 -0400 (EDT) <=
        • John Sidlo - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id QAA20986Wed, 19 Aug 1998 16:15:47 -0400 (EDT)
          • Brandon Ibach - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id OAA12286Thu, 20 Aug 1998 14:22:27 -0400 (EDT)
          • John Sidlo - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id PAA16334Thu, 20 Aug 1998 15:52:02 -0400 (EDT)
      • shennessy - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id MAA22738Wed, 19 Aug 1998 12:42:43 -0400 (EDT)