Re: Deriving unique href target?

Subject: Re: Deriving unique href target?
From: Chris Maden <crism@xxxxxxxxxxx>
Date: Mon, 8 Jun 1998 12:00:48 -0400 (EDT)
[Sorry for the delay; a change in domain of outgoing mail meant I
couldn't post.]

Please post some sample markup and the stylesheet you're using right
now.

I've found that most of the time where I want a link in the HTML,
there's already ID/IDREF in the SGML, and so I use that.  I wrote a
function that uses the ID, if there is one, and generates one based on
all-element-number if not:

(define (gen-id snl)
  (let ((this-id (attribute-string (norm "id")
                                   snl)))
    (if this-id
        this-id
        (string-append "AUTOID-"
                       (number->string (all-element-number snl))))))

-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
  • Deriving unique href target?
    • Wroth, Mark - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA05533Thu, 4 Jun 1998 10:17:05 -0400 (EDT)
      • Daniel Speck - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id RAA20187Thu, 4 Jun 1998 17:42:00 -0400 (EDT)
      • <Possible follow-ups>
      • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id MAA20707Mon, 8 Jun 1998 12:08:21 -0400 (EDT) <=