[parenscript-devel] How to generate element[i].childNodes[0].nodeValue

Wout Perquin wout.perquin at skynet.be
Tue Nov 24 22:23:20 UTC 2009


Hi Scott,
ps:@ does the job.
(ps:ps (let ((var (ps:@ (aref (ps:@ (aref element i) :child-node)
0) :node-value))))) 
renders : "var var = element[i].childNode[0].nodeValue;" exactly what I
wanted.
Concerning the DOT implementation, it was merely a reflection but has
now become some kind of a challenge.  Will think about it.
Will have a look into your suggestion for :USE parenscript.
Thanks, Wout


On Tue, 2009-11-24 at 12:50 -0700, sblist at me.com wrote:
> Hi Wout,
> 
> On 2009-11-24, at 2:42 PM, Wout Perquin wrote:
> 
> > Hi Scott,
> > It renders "var var = at(at(element[i], childNode)[0], nodeValue);"
> > Parenscript turns the @ into at.
> 
> You need to use PS:@. I think most folks would
> create their own package and :USE parenscript:
> 
> (defpackage #:your-package
>   (:use #:common-lisp #:parenscript)
> 
> ... using un-interned keywords or strings to 
> your taste.
> 
> > I would be happy with a "dot operator", so that I could code :
> > (dot (aref element i)(aref child-node 0) node-value)
> > it wouldnt be a bad extension to Parenscript :)
> 
> I wonder if you could come up with an implementation
> of DOT that does what you want unambiguously... I'd
> think this hasn't come up before because most folks 
> like to stick with prefix notation in PS (aside from 
> the old symbol mangling with '.')
> 
> - Scott
> 
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel





More information about the parenscript-devel mailing list