From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: How to render raw data using sxml? Date: Wed, 13 Jul 2016 11:57:46 +0200 Message-ID: <20160713095745.GA30577@tuxteam.de> References: <20160710215849.455f55fa@jcubic> <20160712222030.04b5218f@jcubic> <20160712222320.76ce7254@jcubic> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1468403914 13995 80.91.229.3 (13 Jul 2016 09:58:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2016 09:58:34 +0000 (UTC) Cc: guile-user@gnu.org To: Jakub Jankiewicz Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Jul 13 11:58:19 2016 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 1bNGvq-000406-Ei for guile-user@m.gmane.org; Wed, 13 Jul 2016 11:58:18 +0200 Original-Received: from localhost ([::1]:46305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNGvp-00069T-MD for guile-user@m.gmane.org; Wed, 13 Jul 2016 05:58:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNGvU-00069D-OO for guile-user@gnu.org; Wed, 13 Jul 2016 05:57:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNGvR-0003oX-4J for guile-user@gnu.org; Wed, 13 Jul 2016 05:57:55 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:34481 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNGvQ-0003oT-UE for guile-user@gnu.org; Wed, 13 Jul 2016 05:57:53 -0400 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1bNGvK-000889-24; Wed, 13 Jul 2016 11:57:46 +0200 In-Reply-To: <20160712222320.76ce7254@jcubic> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.lisp.guile.user:12742 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, Jul 12, 2016 at 10:23:20PM +0200, Jakub Jankiewicz wrote: [...] > I've commented out (#\" . "quot") in alist->hash-table and it work. thanks > for your help. I wised up a bit, to get an idea on how it's supposed to work (if there's such a thing on the Internet ;-) and found out: - in XHTML, the content of the script tag is parsed character data (#PCDATA). This means that entities (" and so on) *will be parsed and substituted*. Not so for HTML: there it's raw character data (#CDATA), and no entity substitution is supposed to happen [1] So your approach goes in the right direction. When outputting HTML, no substitution is supposed to be done (no " and no < and so on). - But how you keep your thing from tripping over some nasty deeply embedded in the javascript text, then? The very readable [2] suggests: don't do it, then. That means: munge the javascript until it doesn't contain that nastygram. E.g. var nasty=""; Whee. Looks kinda cool, somehow. (that means you can only automate this task if you manage to kinda half-parse the provided javascript thing, right? But perhaps one can prove that "