Re: Announce: sxml-match, a pattern matcher for SXML
"Dmitry Lizorkin" <[email protected]> Tue, 15 Mar 2005 13:54:29 +0300
| Newsgroups | gmane.lisp.scheme.ssax-sxml |
|---|---|
| Message-ID | <[email protected]> |
Hello!
I am very interested in sxml-match and I would like to write a pattern that
allows binding not just a single node, but a list of nodes. I failed to find
the corresponding guideline in the manual, but I seemed to have figured it
out for SXML non-attribute nodes:
(sxml-match
'(elem (a 1) (b 2) (c 3) (d 4))
[(elem (a ,i) (b ,j) . ,x)
(list i j x)
])
==>
(1 2 ((c 3) (d 4)))
However, the same syntax doesn't work for SXML attributes:
(sxml-match
'(elem (@ (a 1) (b 2) (c 3) (d 4)))
[(elem (@ (a ,i) (b ,j) . ,x))
(list i j x)
])
==>
bad syntax in: (unquote x)
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?
Regards,
Dmitry
-------------------------------------------------------
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