Re: Again with the System Identifiers

Subject: Re: Again with the System Identifiers
From: Toby Speight <Toby.Speight@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: 29 Jul 1999 12:25:28 +0100
Chris> Chris Maden <URL:mailto:crism@xxxxxxxxxxx>

0> In article <199907281742.NAA25190@xxxxxxxxxxxx>, Chris wrote:

Chris> Here's the code I ended up using; it's simple, but maybe it
Chris> could drop into the cookbook:
Chris>
Chris> (let* ((entref (attribute-string (norm "entityref")))
Chris>        (fileref (if entref
Chris>                     (if (entity-system-id entref
Chris>                                           (current-node))
Chris>                         (entity-system-id entref
Chris>                                           (current-node))
Chris>                         (entity-generated-system-id entref
Chris>                                                     (current-node)))
Chris>                     (attribute-string (norm "fileref")))))

The form (if x x y) which you have above, is more compactly expressed
(or x y):

(let* ((entref (attribute-string (norm "entityref")))
       (fileref (if entref
                    (or (entity-system-id entref
                                          (current-node))
                        (entity-generated-system-id entref
                                                    (current-node)))
                    (attribute-string (norm "fileref")))))

-- 


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


Current Thread