Re: Announce: sxml-match, a pattern matcher for SXML

Jim Bender <jim-WkOkIs/[email protected]> Tue, 15 Mar 2005 20:28:27 -0600
Newsgroups gmane.lisp.scheme.ssax-sxml
Message-ID <[email protected]>
On Mar 15, 2005, at 4:54 AM, Dmitry Lizorkin wrote:
> How should I write the code to bind the variable `x' to a list of all
> attributes that are not matched by another parts of the pattern?

It was not possible to do this in the initial version I posted,
though this seems quite useful to me. Thanks!

I have just add this to sxml-match. It is now possible to write
your example,

(sxml-match '(elem (@ (a 1) (b 2) (c 3) (d 4)))
    [(elem (@ (a ,i) (b ,j) . ,x))
     (list i j x)])

And get the expected result:

==> (1 2 ((c 3) (d 4)))

As before, sxml-match is available at:
    http://celtic.benderweb.net/sxml-match/

Jim



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click