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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: IDREFS, Toby Speight | Thread | Maintainer needed for HTML 3.2 styl, Jon Bosak |
Re: IDREFS, Chris Maden | Date | Re: DAVENPORT: explanation of index, Matthias Clasen |
Month |