From: sirgazil <sirgazil@zoho.com>
To: "Guile User" <guile-user@gnu.org>
Subject: htmlprag: write-shtml-as-html - invalid SHTML thing 2019
Date: Sat, 07 Mar 2020 15:00:01 -0500 [thread overview]
Message-ID: <170b695487c.11e7e8b11118107.1804797738890702285@zoho.com> (raw)
Hello,
I have websites written in SHTML and I use "sxml->xml" to generate HTML pages, but I wanted to use "shtml->html" from htmlprag instead (https://www.nongnu.org/guile-lib/doc/ref/htmlprag/). However, once I change my code to use "shtml->html", I get a "write-shtml-as-html - invalid SHTML thing 2019" error, which seems to come from numbers that I didn't convert to strings in my SHTML templates.
A short example to reproduce the error:
scheme@(guile-user)> (use-modules (htmlprag) (sxml simple))
scheme@(guile-user)> (with-output-to-string (lambda () (sxml->xml '(p 2020))))
$1 = "<p>2020</p>"
scheme@(guile-user)> (shtml->html '(p 2020))
ERROR: In procedure scm-error:
write-shtml-as-html - invalid SHTML thing 2020
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In htmlprag.scm:
1547:4 4 (shtml->html _)
1526:4 3 (write-shtml-as-html _ _)
1440:39 2 (do-thing _)
In ice-9/boot-9.scm:
260:13 1 (for-each #<procedure do-thing (thing)> (2020))
In unknown file:
0 (scm-error misc-error #f "~A ~S" ("write-shtml-as-html - invalid SHTML thing" 2020) #f)
Do you know why numbers have to be converted to strings for "shtml->html" to work and not for "sxml->xml"?
---
https://sirgazil.bitbucket.io/
reply other threads:[~2020-03-07 20:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=170b695487c.11e7e8b11118107.1804797738890702285@zoho.com \
--to=sirgazil@zoho.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).