GNU bug report logs - #66366
[PATCH] doc: Add explanation on how to avoid escaping in SXML

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Reported by: Ekaitz Zarraga <ekaitz@HIDDEN>; Keywords: patch; dated Thu, 5 Oct 2023 20:50:02 UTC; Maintainer for guile is bug-guile@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Oct 2023 20:49:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 05 16:49:21 2023
Received: from localhost ([127.0.0.1]:48633 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qoVHc-0006yB-Nw
	for submit <at> 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 <ekaitz@HIDDEN>) id 1qoVHa-0006xt-R3
 for submit <at> 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 <ekaitz@HIDDEN>) id 1qoVHB-0001PU-Tl
 for bug-guile@HIDDEN; 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 <ekaitz@HIDDEN>) id 1qoVHA-0007iD-73
 for bug-guile@HIDDEN; 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
To: "bug-guile@HIDDEN" <bug-guile@HIDDEN>
From: Ekaitz Zarraga <ekaitz@HIDDEN>
Subject: [PATCH] doc: Add explanation on how to avoid escaping in SXML
Message-ID: <vykFBaOoIW89r3Pe8HxJxD9jHGFVCKeAFFkGd1YDUtvQNw4CpnhYWIsrJEufcgWm9-V5MN5o9J7t9BkanPUDqvJVaY6MGdaPRRNjdQbD5PA=@elenq.tech>
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@HIDDEN;
 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-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

From 7754fda28a6029116ee49172af28b5aa28bcda7e Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@HIDDEN>
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 "<i>Some example</i>"))
+@result{} <code>&lt;i&gt;Some example&lt;/i&gt;</code>
+@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 "<i>Some example</i>"))))
+@result{} <code><i>Some example</i></code>
+@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






Acknowledgement sent to Ekaitz Zarraga <ekaitz@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#66366; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 5 Oct 2023 21:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.