From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Aidan Gauland Newsgroups: gmane.lisp.guile.user Subject: sxml-match example from manual fails Date: Sun, 10 Jun 2012 14:19:37 +1200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1339343561 2561 80.91.229.3 (10 Jun 2012 15:52:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 10 Jun 2012 15:52:41 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jun 10 17:52:40 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SdkRP-0007wN-3N for guile-user@m.gmane.org; Sun, 10 Jun 2012 17:52:35 +0200 Original-Received: from localhost ([::1]:42129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdkRP-0001jJ-13 for guile-user@m.gmane.org; Sun, 10 Jun 2012 11:52:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdXks-0007Pe-LO for guile-user@gnu.org; Sat, 09 Jun 2012 22:19:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SdXkq-00056d-TX for guile-user@gnu.org; Sat, 09 Jun 2012 22:19:50 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:46930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdXkq-00056N-MV for guile-user@gnu.org; Sat, 09 Jun 2012 22:19:48 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SdXkm-0001zh-Ao for guile-user@gnu.org; Sun, 10 Jun 2012 04:19:44 +0200 Original-Received: from 114-134-7-181.rurallink.co.nz ([114.134.7.181]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Jun 2012 04:19:44 +0200 Original-Received: from aidalgol by 114-134-7-181.rurallink.co.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Jun 2012 04:19:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 114-134-7-181.rurallink.co.nz User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.4) Gecko/20120510 Icedove/10.0.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-Mailman-Approved-At: Sun, 10 Jun 2012 11:52:31 -0400 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9496 Archived-At: 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