[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
htmlprag: write-shtml-as-html - invalid SHTML thing 2019
From: |
sirgazil |
Subject: |
htmlprag: write-shtml-as-html - invalid SHTML thing 2019 |
Date: |
Sat, 07 Mar 2020 15:00:01 -0500 |
User-agent: |
Zoho Mail |
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/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- htmlprag: write-shtml-as-html - invalid SHTML thing 2019,
sirgazil <=