Subject: RE: SOLUTION FOR : How can I add a new children in a node?? From: "Didier PH Martin" <martind@xxxxxxxxxxxxx> Date: Mon, 4 Oct 1999 08:13:54 -0400 |
Hi Frank, Thanks for your comments on Scheme and DSSSL, I'll keep them too in my notebook for future reference. I agree with you, scheme and DSSSL are not quite lambda-calculus. Cheers Didier PH Martin mailto:martind@xxxxxxxxxxxxx http://www.netfolder.com -----Original Message----- From: owner-dssslist@xxxxxxxxxxxxxxxx [mailto:owner-dssslist@xxxxxxxxxxxxxxxx]On Behalf Of Frank A. Christoph Sent: Monday, October 04, 1999 5:47 AM To: dssslist@xxxxxxxxxxxxxxxx Subject: RE: SOLUTION FOR : How can I add a new children in a node?? I wrote (define (pc) (process-children)) mostly because I wanted to avoid the issue of higher-order functions, but partly because I have developed a phobia against treating primitives in a Scheme implementation as if they were normal higher-order functions. For example, (define and sequential-and) doesn't work, and you can't pass 'and' to another function. In this case, though, there was no need to be so cautious on my part. (I checked.) WRT rebinding, T. Kurt Bond is right about both Scheme's behavior. Personally, I don't play the "overloading game" so I don't pay it much mind, but in Scheme you will notice that the following transcript shows that Scheme resolves the definition of a top-level symbol dynamically, not lexically: > (define (f) (+ 1 1)) > (define + -) > (f) 0 In DSSSL, too, there is a similar behavior (8.4) for primitives: The built-in definition of a variable may be replaced by a top-level definition. The replacement definition shall be used for all references to that variable, even those that occur in process specification parts preceding the part that contains the first top-level definition. So I could redefine the operation associated with uses of +, retroactively; for example, in a later stylesheet module. Does the same hold for process-children, i.e., does it qualify as a "built-in"? At the start of 8.5 it says, "This section describes the expression language's built-in procedures," which seems to imply that there are no others. If that is so, then process-children cannot be rebound, since it's not a built-in. OTOH, it sure seems like a built-in to me, so maybe this ought to be clarified. There is a place in clause 12 where it says that an <expression> in a <style-language-body> should be interpreted as a <style-language-expression>, but this says nothing about the nature of built-ins... (Personally, I think this rebinding behavior is pretty odd when you add it to DSSSL's other unusual binding rule: that top-level rebindings of _non_-primitives have no effect, i.e., only the first definition is significant.) What Brandon wrote about "storing the definition environment" is true about lambda-calculus, but Scheme and DSSSL are not quite lambda-calculus. DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: SOLUTION FOR : How can I add a , Frank A. Christoph | Thread | RE: SOLUTION FOR : How can I add a , Frank A. Christoph |
RE: XSL equivalent sought., Didier PH Martin | Date | RE: SOLUTION FOR : How can I add a , Frank A. Christoph |
Month |