Testing for (current-node)?

Subject: Testing for (current-node)?
From: Norman Walsh <norm@xxxxxxxxxxxxx>
Date: Fri, 20 Feb 1998 09:01:11 -0500
Hello World,

Is it possible to test if (current-node) is allowed?  I have a function:

(define ($lang$)
  (if (inherited-attribute-string "LANG")
      (inherited-attribute-string "LANG")
      %default-lang%))

That fails in a couple of useful contexts where it's being called outside
of a construction rule (or at least where there is no current-node).

Can I write that as:

(define ($lang$)
  (if ???some test???
      (if (inherited-attribute-string "LANG")
          (inherited-attribute-string "LANG")
          %default-lang%)
      %default-lang%))

I can probably nail down all the contexts where there's no current
node and fix it by not calling ($lang$) in those places, but I'd
rather not.

--norm



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


Current Thread
  • Testing for (current-node)?
    • Norman Walsh - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id JAA13728Fri, 20 Feb 1998 09:00:36 -0500 (EST) <=