I'm trying to figure out how to use sxml-match, so I tried an example
from the Guile manual:
https://www.gnu.org/software/guile/manual/html_node/sxml_002dmatch.html
"The example below illustrates the pattern matching of an XML element:
(sxml-match '(e (@ (i 1)) 3 4 5)
[(e (@ (i ,d)) ,a ,b ,c) (list d a b c)]
[,otherwise #f])
Each clause in sxml-match contains two parts: a pattern and one or more
expressions which are evaluated if the pattern is successfully match.
The example above matches an element e with an attribute i and three
children."
But guile doesn't seem to like it:
$ guile
GNU Guile 2.0.5-deb+1-3
[...]
scheme@(guile-user)> (sxml-match '(e (@ (i 1)) 3 4 5) [(e (@ (i ,d)) ,a
,b ,c) (list d a b c)] [,otherwise #f])
While compiling expression:
ERROR: Syntax error:
unknown file:1:0: source expression failed to match any pattern in form
(@ (i (unquote d)))
So, can someone tell me whether there's an error in the manual?
Regards,
Aidan Gauland