From unknown Fri Aug 15 04:06:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#66366: [PATCH] doc: Add explanation on how to avoid escaping in SXML Resent-From: Ekaitz Zarraga Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 05 Oct 2023 20:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66366 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch To: 66366@debbugs.gnu.org X-Debbugs-Original-To: "bug-guile@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.169653896126799 (code B ref -1); Thu, 05 Oct 2023 20:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Oct 2023 20:49:21 +0000 Received: from localhost ([127.0.0.1]:48633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoVHc-0006yB-Nw for submit@debbugs.gnu.org; Thu, 05 Oct 2023 16:49:21 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoVHa-0006xt-R3 for submit@debbugs.gnu.org; Thu, 05 Oct 2023 16:49:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoVHB-0001PU-Tl for bug-guile@gnu.org; Thu, 05 Oct 2023 16:48:54 -0400 Received: from mail-4323.proton.ch ([185.70.43.23]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoVHA-0007iD-73 for bug-guile@gnu.org; Thu, 05 Oct 2023 16:48:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail2; t=1696538929; x=1696798129; bh=S7sDDSZfjFs0HHZ51CgVBiPuNo7SYC2bA09dnZTyxMo=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=pBxa5nhKQDeLcvZv4933QKoZWbxtB1gpS30JOrb/LeForDThEOSRyfGeN0cjmxHuE aCMigOsIIwcXj67kJGVmgEpJdG8NTvr+sDhntoUslsQbsI8r/EOuvluyioZZmafCoG W8OU1VoNFxrZhm9hrPpifm27nxaMk8vb3wpT2xPX0KXDgOfrpMxFjP0gTeWkYUgbQk PKhwkBsRGaNX0offK/l4JRLNAs+OtD0DAMHCXZge+BTC6k3Jw7PgMd3FrDQTU91LPP WXoydFiW7B6VGV0HIvnYo5xh7TUVbQSbT10+A3QT8FbQkFJZSv0Xeh7N/bsMdUtqwc KmlvmkuB0wWEA== Date: Thu, 05 Oct 2023 20:48:34 +0000 From: Ekaitz Zarraga Message-ID: Feedback-ID: 3263582:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.23; envelope-from=ekaitz@elenq.tech; helo=mail-4323.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >From 7754fda28a6029116ee49172af28b5aa28bcda7e Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 5 Oct 2023 22:42:44 +0200 Subject: [PATCH] doc: Add explanation on how to avoid escaping in SXML * doc/ref/sxml.texi (Reading and Writing XML): Add explanation on using a procedure to avoid escaping. --- doc/ref/sxml.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/ref/sxml.texi b/doc/ref/sxml.texi index 835a39b36..b92f4c29e 100644 --- a/doc/ref/sxml.texi +++ b/doc/ref/sxml.texi @@ -203,6 +203,21 @@ the current output port, unless the optional argument = @var{port} is present. @end deffn =20 +Output is automatically escaped as expected for a serializer. + +@example +(sxml->xml `(code "Some example")) +@result{} <i>Some example</i> +@end example + +In order to avoid some string from being escaped, it must be wrapped in a +procedure that writes the string to the @code{(current-output-port)}. + +@example +(sxml->xml `(code ,(lambda () (display "Some example")))) +@result{} Some example +@end example + @deffn {Scheme Procedure} sxml->string sxml Detag an sxml tree @var{sxml} into a string. Does not perform any formatting. --=20 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 22 16:23:38 2024 Received: (at control) by debbugs.gnu.org; 22 Dec 2024 21:23:38 +0000 Received: from localhost ([127.0.0.1]:52179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPTQI-0002BJ-G7 for submit@debbugs.gnu.org; Sun, 22 Dec 2024 16:23:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPTQG-0002B7-Ak for control@debbugs.gnu.org; Sun, 22 Dec 2024 16:23:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPTQA-00061F-Sl for control@debbugs.gnu.org; Sun, 22 Dec 2024 16:23:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=KH+KtuVXQoMr93/O7z/htHgHf+GNdmlUpNQ/vVQXqKU=; b=OqIKln6Wl+wXoa LdK923agZfj3XOO52F5ElkIFeks1/42gTZFGHOhOZaEbquRIifSBQ+5mXJbfDfiZ/busT8A0FGyM4 u+BTBAqaFw/TTsqd+BBhk67af9QqztUPqX1yuIQIfGdPzV6/PbYda1eQ39h/+hkMywenHe14yBneU BAZ2jky2ORttbBlIuPsunb6IuYrAEZCxCaeWvYoeb/kSq1NevyhFca9KqzxaVI1LhcjFgLEZq+B/7 SVJ3SbSMee1wOvvmqTFvuXxveUDNVM4KqDtrxeCC4tJv1NmhEzXyWxR4d/qnmO1Ie3gIALa4aGByf Ptu/tcKWIaoAk3GTeD1A==; Date: Sun, 22 Dec 2024 22:23:28 +0100 Message-Id: <87plljfm3z.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #66366 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 66366 quit