Re: IDREFS

Subject: Re: IDREFS
From: Chris Maden <crism@xxxxxxxxxxx>
Date: Fri, 24 Jul 1998 17:26:18 -0400 (EDT)
Spurred by the suggestion by...?  (I'm sorry; I've spaced the name,
and Mulberry's Web server isn't responding), I dove into the grove
definition, and came up with this.  This is a test loop, which returns
a comma-separated list of the GIs of the targets.  It can be used as
the basis for more complex processing, obviously.  Note that the value
node-property of the attribute is used, rather than the
(attribute-string); the value is a node-list, each of whose nodes is a
token in the attribute value specification.

(let ((linkends (node-property 'value
                               (attribute (norm "linkends")
                                          (current-node)))))
  (let nl-loop
    ((index 0))
    (let ((this-node (node-list-ref linkends
                                    index)))
      (sosofo-append (literal (gi (referent this-node)))
                     (if (= (+ index
                               1)
                            (node-list-length linkends))
                         (empty-sosofo)
                         (sosofo-append (literal ", ")
                                        (nl-loop (+ index
                                                    1))))))))

Jade does not implement (attribute) and (referent):

;; (attribute) from ISO/IEC 10179
(define (attribute name
                   nl)
  (node-list-map (lambda (snl)
                   (named-node name
                               (attributes snl)))
                 nl))

;; (referent) from ISO/IEC 10179
(define (referent nl)
  (node-list-property 'referent
                      nl))

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


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


Current Thread
  • Re: IDREFS, (continued)
    • Norman Walsh - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id OAA24111Fri, 24 Jul 1998 14:33:36 -0400 (EDT)
    • Toby Speight - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id OAA24249Fri, 24 Jul 1998 14:36:34 -0400 (EDT)
      • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id PAA25866Fri, 24 Jul 1998 15:24:27 -0400 (EDT)
        • Toby Speight - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id FAA27435Mon, 27 Jul 1998 05:45:18 -0400 (EDT)
    • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id RAA29016Fri, 24 Jul 1998 17:28:56 -0400 (EDT) <=